Skip to main content

PinchInput

class PinchInput

A module that passes the amount of change to eg.Axes when two pointers are moving toward (zoom-in) or away from each other (zoom-out). use one axis.

constructor

new PinchInput(element, options)
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
elementHTMLElement | String | jQueryAn element to use the eg.Axes.PinchInput module
optionsPinchInputOption✔️The option object of the eg.Axes.PinchInput module
const pinch = new eg.Axes.PinchInput("#area", {
scale: 1
});

// Connect 'something' axis when two pointers are moving toward (zoom-in) or away from each other (zoom-out).
axes.connect("something", pinch);

Methods

destroy

Destroys elements, properties, and events used in a module.

enable

Enables input devices

Returns: PinchInput

  • An instance of a module itself

disable

Disables input devices

Returns: PinchInput

  • An instance of a module itself

isEnabled

Returns whether to use an input device

Returns: Boolean

  • Whether to use an input device