enum DropRouter
Swift
enum DropRouter
Routes an OS drag-and-drop to whichever node it landed on. The node
under the drop point is resolved the same way hover is (hitTestHover);
unlike hover, this is a one-shot lookup at the moment the drop event
arrives, not a continuously tracked position.
Sources/LavaUI/Focus.swift:475
Properties
static let springDelay: Double
How long a drag rests on a spring-loaded target before it opens. Long enough that sweeping across a row of tabs opens none of them; short enough that waiting on one does not feel like being ignored.
Sources/LavaUI/Focus.swift:494
Methods
@discardableResult static func deliver(to target: NodeID?, paths: [String]) -> Bool
Delivers to target if it has a registered handler. Returns true if
consumed — a caller can use this to decide whether to fall back to
some other drop behavior (or none).
Sources/LavaUI/Focus.swift:568
static func hasHandler(_ id: NodeID) -> Bool
So hit-testing can treat a drop-registered box as a valid target even
though it carries no visual hover feedback of its own (see
LayoutHost.hoverWalk).
Sources/LavaUI/Focus.swift:562
static func register(_ id: NodeID, handler: @escaping ([String]) -> Void)
Makes id a drop target: handler runs with the dropped paths.
Sources/LavaUI/Focus.swift:497
static func unregister(_ id: NodeID)
Removes id's drop handler and drag-over callbacks.
Sources/LavaUI/Focus.swift:510