pub enum DragRelease {
Free,
Pin,
PinUntilReheat,
}Expand description
What becomes of a dragged node once the pointer is released.
This is interaction policy rather than physics, but it lives here because what it selects between is whether the node stays in the simulation’s pin set — and because a host tuning drag feel is already tuning the rest of the simulation spec.
Variants§
Free
Release the node. Physics pulls it back toward equilibrium with everything else and the neighbourhood re-settles around it.
The default: it is the only one of the three that cannot accumulate state, so a host that never thinks about pinning never acquires a graph full of immovable nodes.
Pin
Hold the node where it was dropped, indefinitely. Lets a user arrange a layout by hand. Requires the host to offer some way to un-stick a node, or pins accumulate with no gesture to release them.
PinUntilReheat
Hold the node where it was dropped, until the next reheat frees it — so the placement survives the settle it caused, and a later reveal or relayout starts clean.
Trait Implementations§
Source§impl Clone for DragRelease
impl Clone for DragRelease
Source§fn clone(&self) -> DragRelease
fn clone(&self) -> DragRelease
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more