AnnotationDrawingOptionsModel

12 Sep 20251 minute to read

Interface for a class AnnotationDrawingOptions

Properties

enableLineAngleConstraints boolean

Enables angular constraints for line-type annotations.
When set to true, lines and arrows are restricted to fixed angles defined by the restrictLineAngleTo property.
On desktop platforms, holding the Shift key while drawing also activates angle constraints,
allowing precise control over line orientation.

restrictLineAngleTo number

Specifies the angle (in degrees) to which line-type annotations are constrained.

  • The initial drawing direction is treated as the 0° reference point.
  • Snapped angles are calculated based on the specified increment.
    • If the increment is not a divisor of 360, angles reset after reaching 360°.
    • Example:
      • restrictLineAngleTo: 45 → Snapped angles: 0°, 45°, 90°, …, 360°
      • restrictLineAngleTo: 100 → Snapped angles: 0°, 100°, 200°, 300°, 360°
  • Angular constraints apply only to lines and arrows when adjusted using the selector.
  • The original direction of the line is used as the reference during selector-based modifications.