Skip to main content

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

  1. Creates a Pinch In task.
  2. Performs a pinch-in gesture.
  3. 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.

💬 Help us improve this documentation

Was this information useful?

Your feedback helps us keep our documentation accurate, up to date, and useful.