ISpriteEvents

Type interface

Defines available events available for Sprite.

Inheritance

ISpriteEvents extends IInteractionObjectEvents.

ISpriteEvents is extended by IPointedShapeEvents, IPolylineEvents, IRectangleEvents, IContainerEvents, IGridEvents, ITickEvents, IAxisFillEvents, IAxisLineEvents, IRoundedRectangleEvents, ILineEvents, ICircleEvents, ITrapezoidEvents, ITriangleEvents, IPolygonEvents, IImageEvents, IStarEvents, IForceDirectedLinkEvents.

Properties

appeared
#

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

Invoked when Sprite appears. Sprite appears when sprite.appear() method is called and show animation is finished.

beforedisposed
#

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

Invoked just before Sprite is disposed.

beforevalidated
#

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

Invoked before Sprite is validated.

@todo Description (check)

blur
#

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

Inherited from IInteractionObjectEvents

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

disabled
#

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

Invoked when sprite is disabled

doublehit
#

Param SpritePointerTypeEvent & SpritePointEvent & SpriteMouseTouchEvent & { type: "doublehit",
  target: Target }

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

down
#

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

Inherited from IInteractionObjectEvents

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 }

Inherited from IInteractionObjectEvents

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

dragged
#

Param SpritePointerTypeEvent & SpriteShiftEvent & SpritePointEvent & { event: MouseEvent | TouchEvent | KeyboardEvent,
  startPoint: IPoint,
  type: "dragged",
  target: Target }

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

This is simmilar but different then "drag" event in that it kicks in after "drag" which modifies Sprite coordinates. This allows doing own manipulations and corrections to element positions.

dragstart
#

Param PointerTypeEvent & { event: MouseEvent | TouchEvent | KeyboardEvent,
  type: "dragstart",
  target: Target }

Inherited from IInteractionObjectEvents

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 }

Inherited from IInteractionObjectEvents

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

enabled
#

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

Invoked when sprite is enabled

focus
#

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

Inherited from IInteractionObjectEvents

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

globalscalechanged
#

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

Invoked when the global scale changed, meaning that scale of Sprite or any of its ascendants changed.

hidden
#

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

Invoked when visible Sprite is hidden.

hit
#

Param SpritePointerTypeEvent & SpritePointEvent & SpriteMouseTouchEvent & { type: "hit",
  target: Target }

Invoked when Sprite is clicked or touched.

inited
#

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

Invoked when Sprite is initialized.

input
#

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

Inherited from IInteractionObjectEvents

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

keydown
#

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

Inherited from IInteractionObjectEvents

Invoked when the key is pressed on the keyboard.

keypress
#

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

Inherited from IInteractionObjectEvents

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 }

Inherited from IInteractionObjectEvents

Invoked when the key is released on the keyboard.

maxsizechanged
#

Param { previousHeight: number,
  previousWidth: number,
  type: "maxsizechanged",
  target: Target }

Invoked when maximum available size of the Sprite changes, i.e. when the size of parent container changes.

out
#

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

Inherited from IInteractionObjectEvents

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 }

Inherited from IInteractionObjectEvents

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?

parentset
#

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

Invoked when a sprite is added to a parent

positionchanged
#

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

Invoked when position of the Sprite changes.

propertychanged
#

Param { property: string,
  type: "propertychanged",
  target: Target }

Invoked when property of the Sprite changes.

ready
#

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

Invoked when Sprite is becomes ready, that is it has finished all calculations and building itself.

For Container object (and all those inheriting it, including charts) this event will fire when all children become ready.

removedfromqueue
#

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

Invoked when chart is shown if am4core.options.queue = true or/and am4core.options.onlyShowOnViewport = true.

resize
#

Param PointerTypeEvent & ScaleEvent & MouseTouchEvent & { point1: IPoint,
  point2: IPoint,
  startPoint1: IPoint,
  startPoint2: IPoint,
  type: "resize",
  target: Target }

Inherited from IInteractionObjectEvents

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

rightclick
#

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

Inherited from IInteractionObjectEvents

Invoked when right mouse button is clicked on the object.

shown
#

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

Invoked when hidden Sprite is shown.

sizechanged
#

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

Invoked when size of the Sprite changes.

swipe
#

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

Inherited from IInteractionObjectEvents

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 }

Inherited from IInteractionObjectEvents

Invoked when user performs "swiping" gesture towards left.

swiperight
#

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

Inherited from IInteractionObjectEvents

Invoked when user performs "swiping" gesture towards right.

toggled
#

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

Invoked when togglable Sprite is being toggled on and off. (its isActive property is being changed)

track
#

Param SpritePointerTypeEvent & SpritePointEvent & SpritePointerEvent & SpriteMouseTouchEvent & { type: "track",
  target: Target }

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

transformed
#

Param { dummyData: string,
  type: "transformed",
  target: Target }

@todo Description

transitionended
#

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

Invoked when Sprite completes transition to a SpriteState.

up
#

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

Inherited from IInteractionObjectEvents

Invoked when the mouse button is released or touch ends.

validated
#

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

Invoked when Sprite is validated. (on init or after update)

@todo Description (check)

visibilitychanged
#

Param { visible: boolean,
  type: "visibilitychanged",
  target: Target }

Invoked when visibility of the Sprite changes. (from visible to hidden, and vice versa)

wheel
#

Param SpritePointEvent & SpriteShiftEvent & { event: WheelEvent,
  type: "wheel",
  target: Target }

Invoked when user turns mouse wheel while over the Sprite.

wheeldown
#

Param SpritePointEvent & SpriteShiftEvent & { event: WheelEvent,
  type: "wheeldown",
  target: Target }

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

wheelleft
#

Param SpritePointEvent & SpriteShiftEvent & { event: WheelEvent,
  type: "wheelleft",
  target: Target }

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

wheelright
#

Param SpritePointEvent & SpriteShiftEvent & { event: WheelEvent,
  type: "wheelright",
  target: Target }

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

wheelup
#

Param SpritePointEvent & SpriteShiftEvent & { event: WheelEvent,
  type: "wheelup",
  target: Target }

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

zIndexChanged
#

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

Invoked when zIndex of a sprite is changed

There are 18 inherited items currently hidden from this list.