TyphonJS Runtime Library (FVTT) 0.3.0
  • #runtime/svelte/animate/gsap
  • draggableGsap

Function draggableGsap

  • draggableGsap(
        node: HTMLElement,
        options: DraggableGsapOptions,
    ): ActionReturn<Partial<DraggableGsapOptions>>
  • Provides an action to enable pointer dragging of an HTMLElement using GSAP to or quickTo to invoke position.set on a given #runtime/svelte/store/position!TJSPosition instance provided. You may provide a easeOptions object sent to the tween to modify the duration / easing. When the attached boolean store state changes the draggable action is enabled or disabled.

    Note: Requires GSAP 3.10+ for quickTo support.

    Parameters

    • node: HTMLElement

      The node associated with the action.

    • options: DraggableGsapOptions

      Draggable Gsap options.

    Returns ActionReturn<Partial<DraggableGsapOptions>>

    Action lifecycle functions.

Settings

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