Class: PinchGesture

ui.PinchGesture

new ui.PinchGesture ()

Element for detecting pinch gestures on a touchscreen.

This element requires a target MouseBox element for detecting events.

Properties:
Name Type Description
distance number

[readonly] The current distance between the two touchpoints.

previousDistance number

[readonly] The previous distance between the two touchpoints. This value is 0 at the start of a pinch gesture.

pinching bool

[readonly] Whether the user is currently making a pinch gesture.

target html.MouseBox

(default: thisMouseBox) The target for detecting the touchpoints.

x1 number

[readonly] The X coordinate of the first touchpoint.

x2 number

[readonly] The X coordinate of the second touchpoint.

y1 number

[readonly] The Y coordinate of the first touchpoint.

y2 number

[readonly] The Y coordinate of the second touchpoint.