pub struct NodePointerResizeRequest {
pub node: NodeId,
pub start: CanvasPoint,
pub current: CanvasPoint,
pub direction: NodeResizeDirection,
pub constraints: NodeResizeConstraints,
pub keep_aspect_ratio: bool,
pub axis: NodeResizeAxis,
}Expand description
Canvas-space request for resizing one node from pointer movement.
Fields§
§node: NodeIdNode being resized.
start: CanvasPointPointer position at resize start in canvas space.
current: CanvasPointCurrent pointer position in canvas space.
direction: NodeResizeDirectionResize control direction that determines affected axes and position updates.
constraints: NodeResizeConstraintsOptional min/max bounds applied before planning.
keep_aspect_ratio: boolWhether pointer-derived dimensions preserve the starting aspect ratio.
axis: NodeResizeAxisOptional axis filter for pointer-derived dimensions.
Implementations§
Source§impl NodePointerResizeRequest
impl NodePointerResizeRequest
pub fn new( node: NodeId, start: CanvasPoint, current: CanvasPoint, direction: NodeResizeDirection, ) -> Self
pub fn with_constraints(self, constraints: NodeResizeConstraints) -> Self
pub fn with_keep_aspect_ratio(self, keep_aspect_ratio: bool) -> Self
pub fn with_axis(self, axis: NodeResizeAxis) -> Self
Trait Implementations§
Source§impl Clone for NodePointerResizeRequest
impl Clone for NodePointerResizeRequest
Source§fn clone(&self) -> NodePointerResizeRequest
fn clone(&self) -> NodePointerResizeRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NodePointerResizeRequest
Source§impl Debug for NodePointerResizeRequest
impl Debug for NodePointerResizeRequest
Source§impl<'de> Deserialize<'de> for NodePointerResizeRequest
impl<'de> Deserialize<'de> for NodePointerResizeRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for NodePointerResizeRequest
impl PartialEq for NodePointerResizeRequest
Source§fn eq(&self, other: &NodePointerResizeRequest) -> bool
fn eq(&self, other: &NodePointerResizeRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for NodePointerResizeRequest
impl Serialize for NodePointerResizeRequest
impl StructuralPartialEq for NodePointerResizeRequest
Auto Trait Implementations§
impl Freeze for NodePointerResizeRequest
impl RefUnwindSafe for NodePointerResizeRequest
impl Send for NodePointerResizeRequest
impl Sync for NodePointerResizeRequest
impl Unpin for NodePointerResizeRequest
impl UnsafeUnpin for NodePointerResizeRequest
impl UnwindSafe for NodePointerResizeRequest
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