Pinch In
The Pinch In action performs a pinch-in gesture from the outer edges towards the centre of the screen. This gesture is commonly used to zoom out in applications that support pinch gestures, such as maps, image viewers, and document readers.
When to Use
Use this action when you want to:
- Zoom out on a map.
- Reduce the zoom level of an image.
- View more content on the screen.
- Interact with applications that support multi-touch gestures.
Syntax
var task = suremdmjs.automate().pinchIn();
suremdmjs.automate().performAction(
task,
"onSuccess",
"onFailure"
);
Parameters
This action does not require any parameters.
Example
!#suremdmjs
var task = suremdmjs.automate().pinchIn();
suremdmjs.automate().performAction(
task,
"zoomOutCompleted",
"zoomOutFailed"
);
How This Example Works
- Creates a Pinch In task.
- Performs a pinch-in gesture.
- Executes the success callback after the gesture completes.
Expected Result
The application zooms out, displaying a larger portion of the content.
note
Pinch gestures are supported only by applications that implement multi-touch zoom functionality.