IInteractionObjectEvents

Type interface

Defines events for InteractionObject.

Inheritance

IInteractionObjectEvents extends IBaseObjectEvents.

IInteractionObjectEvents is extended by ISpriteEvents.

Properties

blur
#

Param { event: FocusEvent,
  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 PointerTypeEvent & 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 PointerTypeEvent & PointerEvent & MouseTouchEvent & { type: "down",
  target: Target }

Invoked when the mouse button is pressed or touch starts.

drag
#

Param PointerTypeEvent & ShiftEvent & PointEvent & { event: MouseEvent | TouchEvent | KeyboardEvent,
  startPoint: IPoint,
  type: "drag",
  target: Target }

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

dragstart
#

Param PointerTypeEvent & { event: MouseEvent | TouchEvent | KeyboardEvent,
  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 PointerTypeEvent & { event: MouseTouchEvent | KeyboardEvent,
  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 { event: FocusEvent,
  type: "focus",
  target: Target }

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

hit
#

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

Invoked when object is clicked or touched.

input
#

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

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

keydown
#

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

Invoked when the key is pressed on the keyboard.

keypress
#

Param { event: KeyboardEvent,
  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 { event: KeyboardEvent,
  type: "keyup",
  target: Target }

Invoked when the key is released on the keyboard.

out
#

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

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

NOTE: this event might not always contains pointer parameter as event might be triggered by API?

over
#

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

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

NOTE: this event might not always contains pointer parameter as event might be triggered by API?

resize
#

Param PointerTypeEvent & ScaleEvent & MouseTouchEvent & { point1: IPoint,
  point2: IPoint,
  startPoint1: IPoint,
  startPoint2: IPoint,
  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 PointerTypeEvent & MouseTouchEvent & { type: "swipe",
  target: Target }

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

swipeleft
#

Param PointerTypeEvent & MouseTouchEvent & { type: "swipeleft",
  target: Target }

Invoked when user performs "swiping" gesture towards left.

swiperight
#

Param PointerTypeEvent & MouseTouchEvent & { type: "swiperight",
  target: Target }

Invoked when user performs "swiping" gesture towards right.

track
#

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

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

up
#

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

Invoked when the mouse button is released or touch ends.

wheel
#

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

Invoked when user turns mouse wheel while over the object.

wheeldown
#

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

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

wheelleft
#

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

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

wheelright
#

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

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

wheelup
#

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

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