Global

Members

(constant) NODE_DEFAULTS

Description:
  • Default values for node and connection properties.

Source:

Default values for node and connection properties.

Methods

clampPosition()

Description:
  • Clamp a position within a coordinate extent.

Source:

generateId()

Description:
  • Generate a unique ID.

Source:

getBezierPath() → {Object}

Description:
  • Get bezier curve path.

Source:
Returns:
Type
Object

getControlOffset()

Description:
  • Calculate the control point offset for bezier curves based on handle position.

Source:

getDiamondEdgePoint()

Description:
  • Get a point on the diamond edge for same-side handles. Each "side" of the diamond is split into two edges meeting at the vertex. ratio < 0.5: on the first edge, ratio >= 0.5: on the second edge.

Source:

getEllipseEdgePoint()

Description:
  • Get a point on the ellipse edge for handle positioning. Maps ratio (0..1) to a parametric angle based on the side.

Source:

getHandlePosition()

Description:
  • Calculate the absolute position of a handle on the canvas.

Source:

getOverlappingNodes()

Description:
  • Get all nodes that overlap with a given rectangle.

Source:

getSmoothStepPath() → {Object}

Description:
  • Get smooth step (rounded right-angle) path.

Source:
Returns:
Type
Object

getStepPath() → {Object}

Description:
  • Get step (right-angle) path.

Source:
Returns:
Type
Object

getStraightPath() → {Object}

Description:
  • Get straight line path.

Source:
Returns:
Type
Object

getTriangleEdgePoint()

Description:
  • Get a point on the triangle edge for handle positioning. Supports 4 directions: triangle (up), triangle-right, triangle-down, triangle-left.

Source:

isValidConnection()

Description:
  • Validate a potential connection.

Source:

labelAtHalfLength()

Description:
  • Find the point at exactly half the total Manhattan path length.

Source:

lookupRoute()

Description:
  • draw.io OrthConnector route generation. Uses bit-encoded route patterns + quad rotation + limits clamping. Returns waypoint array or null (fallback needed).

Source:

rectsOverlap()

Description:
  • Check if two rectangles overlap.

Source:

segmentFallback()

Description:
  • SegmentConnector fallback (draw.io style). Used when nodes are too close for OrthConnector (tooShort).

Source:

snapPosition(position, gridSize)

Description:
  • Snap a position to the nearest grid point.

Source:
Parameters:
Name Type Description
position Object
gridSize number | null

Grid cell size (single number for both axes)