IInteractionObjectEvents

Type interface

Defines events for InteractionObject.

Inheritance

IInteractionObjectEvents extends IBaseObjectEvents.

IInteractionObjectEvents is extended by ISpriteEvents.

Properties

blur
#

Param { type: "blur",
  target: Target }

Invoked when focusable object loses focus, e.g. by clicking outside it or pressing TAB button to focus on the next focusable object.

doublehit
#

Param PointEvent & MouseTouchEvent & { type: "doublehit",
  target: Target }

Invoked when object is clicked or touched twice in rapid succession.

Check IHitOptions for settings about double hit.

down
#

Param PointerEvent & MouseTouchEvent & { type: "down",
  target: Target }

Invoked when the mouse button is pressed or touch starts.

drag
#

Param ShiftEvent & PointEvent & { type: "drag",
  target: Target }

Invoked when draggable object is being dragged. (using mouse, touch or keyboard)

dragstart
#

Param { type: "dragstart",
  target: Target }

Invoked when draggable object dragging starts. This event is not invoked immediatelly after down, but only if there's a movement of the pointer.

dragstop
#

Param { type: "dragstop",
  target: Target }

Invoked when draggable object is released. This event will not fire if position of the object did not change.

focus
#

Param { type: "focus",
  target: Target }

Invoked when focusable object gains focus, e.g. by using TAB button.

hit
#

Param PointEvent & MouseTouchEvent & { type: "hit",
  target: Target }

Invoked when object is clicked or touched.

hold
#

Param PointerEvent & MouseTouchEvent & { type: "hold",
  target: Target }

Invoked when mouse or touch pointer is held down over object for some time.

input
#

Param { type: "input",
  target: Target }

Invoked whenever information changes in the textual input elements, like <input>, <textarea>, etc.

keydown
#

Param { type: "keydown",
  target: Target }

Invoked when the key is pressed on the keyboard.

keypress
#

Param { type: "keypress",
  target: Target }

Invoked when the key generates a "press", e.g. pressing and holding a letter key will generate repeated "keypress" events.

keyup
#

Param { type: "keyup",
  target: Target }

Invoked when the key is released on the keyboard.

out
#

Param MouseTouchEvent & PointerEvent & { type: "out",
  target: Target }

Invoked when mouse cursor moves out of hoverable object or it is no longer touched.

over
#

Param MouseTouchEvent & PointerEvent & { type: "over",
  target: Target }

Invoked when mouse cursor moves over hoverable object or it is touched.

resize
#

Param ScaleEvent & MouseTouchEvent & { type: "resize",
  target: Target }

Invoked when resizable object is being resized either by mouse or touch pinch gesture.

rightclick
#

Param { type: "rightclick",
  target: Target }

Invoked when right mouse button is clicked on the object.

swipe
#

Param { type: "swipe",
  target: Target }

Invoked when user performs "swiping" gesture (quick horizontal movement) on the object, either using mouse or touch.

swipeleft
#

Param { type: "swipeleft",
  target: Target }

Invoked when user performs "swiping" gesture towards left.

swiperight
#

Param { type: "swiperight",
  target: Target }

Invoked when user performs "swiping" gesture towards right.

track
#

Param PointEvent & PointerEvent & MouseTouchEvent & { type: "track",
  target: Target }

Invoked when pointer (mouse cursor or touch point) moves over trackable object.

up
#

Param PointerEvent & MouseTouchEvent & { type: "up",
  target: Target }

Invoked when the mouse button is released or touch ends.

wheel
#

Param PointEvent & ShiftEvent & { type: "wheel",
  target: Target }

Invoked when user turns mouse wheel while over the object.

wheeldown
#

Param PointEvent & ShiftEvent & { type: "wheeldown",
  target: Target }

Invoked when user turns mouse wheel downwards while over the object.

wheelleft
#

Param PointEvent & ShiftEvent & { type: "wheelleft",
  target: Target }

Invoked when user turns mouse wheel leftwards while over the object.

wheelright
#

Param PointEvent & ShiftEvent & { type: "wheelright",
  target: Target }

Invoked when user turns mouse wheel rightwards while over the object.

wheelup
#

Param PointEvent & ShiftEvent & { type: "wheelup",
  target: Target }

Invoked when user turns mouse wheel upwards while over the object.