TyphonJS Runtime Library (FVTT) 0.3.0
  • #runtime/svelte/store/position
  • draggable

Function draggable

  • draggable(
        node: HTMLElement,
        options: DraggableOptions,
    ): ActionReturn<Partial<DraggableOptions>>
  • Provides an action to enable pointer dragging of an HTMLElement and invoke position.set on a given TJSPosition instance provided. When the attached boolean store state changes the draggable action is enabled or disabled.

    Parameters

    • node: HTMLElement

      The node associated with the action.

    • options: DraggableOptions

      Draggable action options.

    Returns ActionReturn<Partial<DraggableOptions>>

    Action lifecycle functions.

Settings

Member Visibility
Demo - Essential Svelte ESM
TyphonJS Runtime Library (FVTT) 0.3.0