LavaUI docs

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:382

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:401

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:473

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:467

static func register(_ id: NodeID, handler: @escaping ([String]) -> Void)

Not documented.

Sources/LavaUI/Focus.swift:403

static func unregister(_ id: NodeID)

Not documented.

Sources/LavaUI/Focus.swift:415