Zoom
Pinches with two fingers to zoom the screen in or out.
Purpose
Sends a two-finger pinch anchored at the centre of the screen to zoom in (fingers spread apart) or out (fingers move together). Use it on maps, images, or any pinch-to-zoom view.
The zoom amount is resolution-independent, so the same setting behaves identically on any device size.
When to use it
- Zooming a map out to see more of it before scanning.
- Zooming in to make a small target big enough to detect or read reliably.
- Resetting a view to a known zoom level at the start of a flow.
When not to use it
- To zoom a specific corner. The pinch is always centred. Pan first with a Swipe, then zoom.
- On a view that does not support pinch-to-zoom — the gesture is dispatched and reports Success regardless.
Requirements
A device that accepts multi-touch input. No upstream node is needed.
How it runs
- Mode picks the direction — Zoom in spreads the fingers, Zoom out pinches them together.
- Compute the two fingers' start and end separation around the screen centre from the Zoom factor — a span ratio, so 200% means the far span is twice the near span on any resolution.
- Dispatch the centred two-finger gesture over a fixed short duration, then route Success.
Legacy flows may carry a per-finger pixel strength instead; that value is used only for those older flows.
Settings
| Setting | Type | Range | Default | What it does |
|---|---|---|---|---|
| Mode | choice | zoomIn, zoomOut | — | Required. Fingers spread, or pinch together |
| Zoom factor | number | 110–500 % | — | How far to zoom. A resolution-independent span ratio (200 = 2×) |
| Strength (px) | integer | 1–2000 | — | Legacy. Absolute per-finger travel; accepted only from older saved flows |
| Wait after | integer | 0–60000 ms | — | Pause after the gesture |
Exactly one of Zoom factor or the legacy Strength must be present.
Why the minimum is 110%
A factor is a magnification ratio, not a signed amount. Values below 110% are rejected because "zoom in by 90%" is not meaningful — to shrink the view, set Mode to Zoom out and keep the factor above 110.
The gesture is always centred
You cannot anchor the pinch anywhere else. To zoom a specific area, bring it to the middle first — a Swipe in Bring a target to the centre mode does this precisely.
Ports
| Port | Taken when | Required |
|---|---|---|
| Success | The pinch gesture was dispatched | No — this port is optional to wire |
| Failure | The gesture could not be sent | No |
| Timeout | The input command did not complete in time | No |
| Cancelled | The run was stopped mid-gesture | No — never followed |
| Fatal | Device disconnected, or the mode/factor is invalid | No — never followed |
Zoom is unusual: it has no required ports. A Zoom whose Success is unwired simply ends that path.
Basic example
Enlarge a map to twice its span:
- Mode: Zoom in
- Zoom factor:
200%
Realistic example — normalise the view
Map automation is far more reliable when every run starts from the same zoom level. A short "reset the view" flow:
Zooming fully out and then back in by a known amount reaches a repeatable zoom level regardless of where the view started — which is what makes the templates in later steps match.
Advanced example — frame a target precisely
Centring then zooming makes small on-screen text large enough for OCR to read accurately — often the difference between a 60% and a 99% read rate.
Best practices
- Pan first, then zoom. The pinch is centred, so framing is a Swipe's job.
- Always settle after zooming. Map views animate; detection immediately afterwards reads the animation.
- Normalise zoom at the start of a flow rather than assuming the previous run left it somewhere sensible.
- Zoom in before OCR on small text. OCR accuracy depends heavily on glyph size.
- Wire Success even though it is optional — an unwired port silently ends the path.
Performance notes
- The gesture duration is fixed by the runtime and is short. The real cost is the settle time you add afterwards.
- Zooming in makes template matching cheaper if you also narrow the search region, and more expensive if you do not — a bigger target on a full-screen search still scans the whole frame.
- Repeated zoom in/out cycles to "reset" cost two gestures plus two settles. Do it once at flow start, not inside a loop.
Memory notes
- Zoom captures no frame and caches nothing.
- Changing zoom invalidates your visual assumptions: templates captured at one zoom level may not match at another. Enable multi-scale detection in the flow's feature gates, or capture templates at the zoom level the flow actually uses.
Common mistakes
| Mistake | What happens | Fix |
|---|---|---|
| Expecting to zoom a corner | The pinch is centred | Swipe the target to the centre first |
| Setting a factor below 110 | Rejected | Use Zoom out for the opposite direction |
| Reading the screen straight after | Reads mid-animation | Add a Wait |
| Templates stop matching after zooming | They were captured at a different scale | Re-capture, or enable multi-scale detection |
| Leaving Success unwired by accident | Path ends silently | Wire it |
Troubleshooting
Nothing happens on screen. The view may not support pinch-to-zoom. The node still reports Success — it dispatched the gesture; it cannot know whether the app responded.
Detection breaks after adding a Zoom.
Templates are scale-sensitive. Either re-capture them at the new zoom, or turn on multiScaleImageDetectionEnabled in flow settings.
The zoom overshoots. Lower the factor and repeat, rather than one large jump.
The node exits Fatal. Mode is missing, or the factor is outside 110–500.
FAQ
Is 200% twice the zoom? It is twice the finger span ratio, which the target app interprets as its zoom gesture. The visual result depends on the app.
Can I zoom to an exact level? No. Zoom is a relative gesture. Normalise by zooming fully out, then in by a known amount.
Does Zoom have a duration setting? No — the gesture time is fixed by the runtime.
Can the factor come from a variable?
Yes, as a whole-string {{variable}} reference.
Related nodes
- Swipe — pan the target to the centre first
- Wait — settle after the gesture
- Find Image — locate what to frame
- Read Text — the usual reason for zooming in
Related pages
- Flow Anatomy — template scale and quality