Categories

'touchpinch' Special Event

Categories: Touch Events

.on( 'touchpinch', ... )

Plugin: jQuery.event.special.touch

Description: Bind special pinch event on touch interaction.

  • .on( 'touchpinch', ... )

    version added: 1.3

This .on() implements a simple bind to the touchpinch interaction.

The touchpinch event fires while the user drag together / apart two fingers.

The recieved event object on touchzoom includes advanced properties:

  • event.pinchState A value which represents the current pinch status (start / while / end).
  • event.pinchDeltaT Milliseconds between current and previous drag event state.
  • event.pinchDelta A float value which represents the diagonal pixel distance between the last and current distance of the fingers.
  • event.pinchDeltaX A float value which represents the pixel distance between the last and current distance of the fingers on the x-axis.
  • event.pinchDeltaY A float value which represents the pixel distance between the last and current distance of the fingers on the y-axis.

See the .on() and .off() method references for a way to bind/unbind event handlers.

The touchpinch special event was replaced by the touchpinch event in version 1.3.