Skip to main content

MoveKeyInput

class MoveKeyInput

A module that passes the amount of change to eg.Axes when the move key stroke is occured. use two axis.

constructor

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

// Connect 'x', 'y' axes when the moveKey is pressed.
axes.connect(["x", "y"], moveKey);

Methods

destroy

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

enable

Enables input devices

Returns: MoveKeyInput

  • An instance of a module itself

disable

Disables input devices

Returns: MoveKeyInput

  • An instance of a module itself

isEnabled

Returns whether to use an input device

Returns: Boolean

  • Whether to use an input device