Components Interactions Examples Tutorials API FAQ
Options
Menu

Hierarchy

Index

Properties

Protected _componentAttachedTo

_componentAttachedTo: Component

Private _downedKeys

_downedKeys: any

Private _keyDispatcher

_keyDispatcher: any

Private _keyDownCallback

_keyDownCallback: any

Private _keyPressCallbacks

_keyPressCallbacks: any

Private _keyReleaseCallbacks

_keyReleaseCallbacks: any

Private _keyUpCallback

_keyUpCallback: any

Private _mouseMoveCallback

_mouseMoveCallback: any

Private _positionDispatcher

_positionDispatcher: any

A Key Interaction listens to key events that occur while the Component is moused over.

Methods

Protected _anchor

Private _handleKeyDownEvent

  • _handleKeyDownEvent(keyCode: any, event: any): any

Private _handleKeyUpEvent

  • _handleKeyUpEvent(keyCode: any): any

Protected _isInsideComponent

  • _isInsideComponent(p: Point): boolean
  • Checks whether a Component-coordinate-space Point is inside the Component.

    Parameters

    • p: Point

      A Point in Compoennt-space coordinates.

    Returns boolean

    Whether or not the point is inside the Component.

Protected _translateToComponentSpace

Protected _unanchor

  • _unanchor(): void

attachTo

  • Attaches this Interaction to a Component. If the Interaction was already attached to a Component, it first detaches itself from the old Component.

    Parameters

detachFrom

enabled

  • enabled(): boolean
  • enabled(enabled: boolean)

offKeyPress

  • Removes a callback that would be called when the key with the given keyCode is pressed and the user is moused over the Component.

    Parameters

offKeyRelease

  • offKeyRelease(keyCode: number, callback: KeyCallback)
  • Removes a callback that would be called when the key with the given keyCode is released if the key was pressed with the mouse inside of the Component.

    Parameters

onKeyPress

  • Adds a callback to be called when the key with the given keyCode is pressed and the user is moused over the Component.

    Parameters

onKeyRelease

  • Adds a callback to be called when the key with the given keyCode is released if the key was pressed with the mouse inside of the Component.

    Parameters

Generated using TypeDoc