Skip to main content

Drag

This node adds drag-and-drop behavior to a UI element.

The Drag node makes a target element movable by the user.

The Drag node attaches to a visual element and handles the logic for dragging it around the screen. It outputs the current position and drag status.

Inputs​

General​

DataDescription
TargetThe visual element to make draggable.
EnabledBoolean.

Constraints​

DataDescription
Axis"Both", "X", "Y". Restrict movement direction.
BoundsOptional object defining limits .

Outputs​

State​

DataDescription
Is DraggingBoolean.
Position XCurrent X offset.
Position YCurrent Y offset.

Events​

SignalDescription
Drag StartTriggered on mouse down.
Drag EndTriggered on mouse up.

Usage​

Draggable Window​

  1. Create a "Window" Group.
  2. Connect Window to Drag node.
  3. The user can now move the window.

Slider Knob​

  1. Restrict Axis to "X".
  2. Use Position X to calculate a value.

Detailed Behavior​

  • Transform: It modifies the CSS property of the target.

Troubleshooting​

  • Not Moving: Ensure the target element has or if not using transforms.