Skip to content

Drag Handle

Nodes that move only when dragged by a designated handle: a side grip on one card, the title bar on the other. Setting UseCustomDragHandle on a node and placing a BlowDragHandle in its template leaves the rest of the body free for content that needs the pointer itself.

⋮⋮
Drag me by the grip
Drag me by the title
Only the title bar drags; the body just selects.
Drag me from anywhere
bit Blow

Try it

  • Drag the ⋮⋮ grip of the first card, or the title bar of the second: the node moves.
  • Drag the body of either card: the node is selected but stays put.
  • Open the status list and pick a value: the body's pointer is free for its own content, so nothing moves.
  • Drag the plain node at the bottom from any point on it, for comparison.

How it works

  • UseCustomDragHandle = true on a node stops its body from starting a drag. Pressing the body still selects the node.
  • BlowDragHandle marks the part of the template that does start a drag. It can wrap any content, anywhere in the template - a narrow grip on the first card, the whole title bar on the second - and Class styles it; the stylesheet gives it the grab cursor.
  • Since the body never drags, a control in it needs no nodrag class: the status <select> keeps its pointer, and graph keys are ignored while it has focus.
  • The bottom node has neither the flag nor a template branch of its own: it is a built-in default node, which drags from anywhere.
  • The card bodies set cursor: default, so only the handles show the grab cursor that every node gets from the stylesheet.
An unhandled error has occurred. Reload 🗙