computeLeaderAttachmentPoint Function
Computes the attachment point for a leader line on a text annotation frame.
The attachment point is determined based on the leader's attachment mode:
"Nearest"
: Finds the closest point on the frame curve to the leader's start point."KeyPoint"
: Uses a specific curve segment and fraction along that segment to determine the point."TextPoint"
: Calculates a point on the text layout (top/bottom, left/right) and projects it onto the frame curve.
computeLeaderAttachmentPoint(leader: TextAnnotationLeader, frameCurve: Loop | Path, textLayout: TextBlockLayout, transform: Transform): Point3d | undefined
@returns The computed attachment point as a Point3d
, or undefined
if it cannot be determined.
Parameter | Type | Description |
---|---|---|
leader | TextAnnotationLeader | The leader props. |
frameCurve | Loop | Path | The curve (Loop or Path) representing the annotation frame. |
textLayout | TextBlockLayout | The layout information for the text block. |
transform | Transform | The transform applied to the text layout. |
Returns - Point3d | undefined
The computed attachment point as a Point3d
, or undefined
if it cannot be determined.
Defined in
Last Updated: 29 July, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.