pub struct GroupDragState {
pub dragging_group: GroupId,
pub start_position: Position,
pub current_position: Position,
pub original_node_positions: HashMap<NodeId, Position>,
}Expand description
Group drag state for tracking ongoing drag operations
Fields§
§dragging_group: GroupIdGroup being dragged
start_position: PositionStarting position when drag began
current_position: PositionCurrent drag position
original_node_positions: HashMap<NodeId, Position>Original positions of all nodes before drag started
Implementations§
Source§impl GroupDragState
impl GroupDragState
Sourcepub fn update_position(&mut self, new_position: Position) -> Position
pub fn update_position(&mut self, new_position: Position) -> Position
Update the current drag position and return the delta
Sourcepub fn delta_from_start(&self) -> Position
pub fn delta_from_start(&self) -> Position
Get the delta from the starting position
Trait Implementations§
Source§impl Clone for GroupDragState
impl Clone for GroupDragState
Source§fn clone(&self) -> GroupDragState
fn clone(&self) -> GroupDragState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GroupDragState
impl RefUnwindSafe for GroupDragState
impl Send for GroupDragState
impl Sync for GroupDragState
impl Unpin for GroupDragState
impl UnwindSafe for GroupDragState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more