StaticsupportsDetermines if a node supports mutable points, which allows for dynamic modification of its points.
The node to check.
True if the node supports mutable points, false otherwise.
StaticreconnectReconnects a connection node to a new target based on the specified event coordinates.
The connection node to reconnect.
The x-coordinate of the new target.
The y-coordinate of the new target.
StaticdisconnectDisconnects a connection node from its target based on the specified coordinates.
The connection node to disconnect.
The x-coordinate of the target to disconnect from.
The y-coordinate of the target to disconnect from.
StaticguessStaticinsertInserts a new point into a connection node at the specified coordinates.
The connection node to modify.
The x-coordinate of the new point.
The y-coordinate of the new point.
StaticremoveRemoves a point from a connection node at the specified coordinates.
The connection node to modify.
The x-coordinate of the point to remove.
The y-coordinate of the point to remove.
StaticsyncSynchronizes the endpoints of a connection node with its anchors.
The connection node to synchronize.
StaticgetGets the anchor point for a connection node.
The connection node.
The connection anchor.
The anchor point or undefined if not found.
StaticreconnectReassigns one endpoint anchor to the nearest handle supported by its current target node.
Assumption: the endpoint already targets the intended node. This method does not perform hit testing.
The connection node containing the endpoint anchor.
Which endpoint to normalize ('from' or 'to').
Maximum distance used while selecting the nearest supported handle.
The updated anchor if one could be resolved, otherwise undefined.
StaticbuildBuilds a connectable anchor from an already-hit handle and local (unrotated) point. This is a pure normalization step and does not perform hit testing.
Node that was hit.
Handle that was hit.
Local (unrotated) point that was hit.
Bounding rectangle of the source node.
A normalized connection anchor, or undefined when the handle is not connectable.
StaticgetResolves the connectable anchor, if any, at the current pointer location.
Connection being re-targeted.
Pointer x coordinate in canvas space.
Pointer y coordinate in canvas space.
The best non-MOVE anchor at the pointer, or MOVE fallback when only body hit is available.
Staticresolve
Provides basic utilities for handling connections between nodes in a diagram. This includes logic for reconnecting and disconnecting endpoints of connections, inserting and removing intermediate points on connections, synchronizing connection endpoints with their attached nodes, and rendering arrowheads on connections. The methods in this class are designed to work with the diagram's coordinate system and node structure to ensure accurate manipulation of connections within the diagram editor.