StaticmoveMoves a node by the specified deltas.
The node to move.
The horizontal delta.
The vertical delta.
Optionalflags: "ignore_scale" | nullOptional flags for movement behavior.
StaticresizeResizes a node based on the specified handle and movement deltas.
The node to resize.
The handle being used for resizing.
The horizontal movement delta.
The vertical movement delta.
OptionalpreserveAspect: booleanWhether to preserve the aspect ratio during resizing.
StaticrotateRotates a node to the specified angle.
The node to rotate.
The angle to rotate the node to.
The unit of the angle, either 'degrees' or 'radians'.
StaticoverlapsStaticinsideStaticlongestStaticcalculateStaticcalculateStaticnormalizeStaticisStaticnearestFinds the nearest allowed connection handle for a point. The result belongs to the 'node' argumewnt and can connect to the 'target' argument in the specified direction. The returned handle is guaranteed to be valid for connection purposes, or MOVE if the point is inside the node and MOVE is allowed.
Target node.
Connection direction, either 'from' or 'to'.
Optional target node for connection validation.
Lookup point in world coordinates.
Whether inside hits should resolve to MOVE fallback when supported.
Optionaltolerance: numberInterior distance threshold.
Nearest connection handle and snapped point, or undefined when no candidate is found.
StaticconnectionResolves the exact connection handle hit at a point within a tolerance.
Matching handle and snapped point, or undefined when no candidate matches.
Provides basic operations for manipulating nodes, such as moving, resizing, rotating, and checking for overlaps or containment. These utilities are designed to work with nodes in a diagram editor, allowing for transformations and hit testing based on the node's geometry and the diagram's coordinate system. The methods take into account the node's points, angle, and bounding rectangle to perform accurate calculations for movement, resizing, and selection. This class can be used as a foundation for implementing more complex node behaviors in a diagram editing application.