Class: ElementPressControlMethod

ElementPressControlMethod(element, parameter, velocity, friction)

Sets the velocity and friction of a single parameter by pressing and unpressing a DOM element.

Constructor

new ElementPressControlMethod(element, parameter, velocity, friction)

Parameters:
Name Type Description
element Element

Element which activates the method when pressed

parameter string

The parameter to be controlled (e.g. x, y or zoom)

velocity number

Velocity at which the parameter changes. Use a negative number for opposite direction

friction number

Friction at which the parameter stops

Implements:

Methods

destroy()

Destructor.