Expand description
Hierarchical drops - file explorers, nested menus, outliners.
The classic tree problem: a drop on a node can mean three different things.
DropIntent captures that trichotomy, intent_from_offset derives it
from where inside the row the pointer sits (top quarter = before, bottom
quarter = after, middle = into), and would_create_cycle guards against
dropping a node into its own subtree.
Re-exports§
pub use TreeNodeTarget_completions::Component::TreeNodeTarget;
Structs§
- NodeId
- Identifies a tree node.
- Tree
Drop Event - A completed tree drop.
- Tree
Node Target Props - Properties for the
TreeNodeTargetcomponent.
Enums§
- Drop
Intent - Where, relative to the target node, the payload should land.
Functions§
- Tree
Node Target - A single tree row that acts as a drop target with intent detection.
- intent_
from_ offset - Derive a
DropIntentfrom the pointer’s Y offset within a row of the given height. Top 25% →Before, bottom 25% →After, middle →Into. - would_
create_ cycle - Would attaching
draggedundertargetcreate a cycle? Walkstarget’s ancestry via theparent_oflookup you provide.