Type Alias: ControllerOptions
type ControllerOptions = object;Options for the annotations control
Properties
authorStyle?
optional authorStyle: Partial<AuthorLineStyle>;Editor-wide default style for every Text annotation's author line. Only applied when an annotation's style.showAuthor is true and properties.author is set; a given field here is overridden by that annotation's own style.authorStyle if set (see TextStyle.authorStyle).
detectMargin
detectMargin: number;The margin in which the Texts are detected when looking for magnet points
editButtonIcon
editButtonIcon: string;SVG icon for the edit button in text editor Should be a complete SVG string (e.g., '')
isEditable()
isEditable: (annotation) => boolean;Called to decide whether an annotation can be dragged, resized, restyled, text-edited, deleted, or re-linked. Defaults to always true. Selection (click to highlight, getSelectedAnnotations()) is unaffected - a non-editable annotation stays fully selectable, just not mutable.
Keep this cheap and synchronous - it can run once per affected annotation on every relevant edit attempt. To react to a change that isn't reflected in the annotation's own data (e.g. a host-side "read-only mode" toggle), call control.setOptions({ isEditable }) again with a new function reference - passing the same reference is a no-op.
Parameters
annotation
Returns
boolean
isVisible()
isVisible: (annotation) => boolean;Called to decide whether an annotation is rendered (including in SVG export) and hit-testable (hover/select/drag via the mouse). Defaults to always true. A hidden annotation stays fully present in getAnnotations(), getAnnotation(), and getSelectedAnnotations() - visibility only controls what's drawn and clickable, not data access.
Keep this cheap and synchronous - it can run once per annotation on every render pass while the view is changing (drag, pan, zoom). Same reactivity note as isEditable applies to changing this after the fact.
Parameters
annotation
Returns
boolean
magnetHandleRadius
magnetHandleRadius: number;Display size of the magnet point
magnetRadius
magnetRadius: number;The radius in which arrows are attracted
maxArrowHeight
maxArrowHeight: number;Maximum height of the arrow in units
minArrowHeight
minArrowHeight: number;Minimum height of the arrow in units
minReadableFontSize
minReadableFontSize: number;Minimum on-screen font size, in pixels, for a scalable (non-fixedSize) Text annotation's content or author line to actually be rendered. Below this, the text is skipped entirely (the box/background still renders) - avoids illegible sub-pixel text and the layout work that produces it. Ignored for fixedSize text (its on-screen size never shrinks with zoom) and during SVG/PNG export (export always renders in full, same as viewport culling). Set to 0 to disable.
sendButtonIcon
sendButtonIcon: string;SVG icon for the send button in text editor Should be a complete SVG string (e.g., '')
showEditButton
showEditButton: boolean;Show edit button in text editor
showSendButton
showSendButton: boolean;Show send button in text editor
textPlaceholder
textPlaceholder: string;Placeholder for the text input