Annotation

Annotation object, instructs editor where and how to draw highlight

Annotation

Classes

Annotation

Members

boundingBox :Rect

The bounding box of the highlight area Must exists
Change since 23.07: if .rect is defined, then .boundingBox (as deprecated member) will no longer have any effect.
Since:
  • 22.07
Deprecated:
  • Deprecated in 23.07, use rect instead for more annotation types support

highlightColor :RGBColor

The pen color to be used by the highlight
Since:
  • 22.07

highlightWeight :number

Pen stroke width of the highlight
Since:
  • 22.07

id :String

The annotation's unique ID. Provided by web-view Should exists so that editor can idendify
Since:
  • 22.11

longTitle :String

The annotation's long title (optional). Will be drawn when mouse is hovering over the annotation
Since:
  • 23.11

points :Array.<Point>

Highlight points of 'Freehand' optional, only used for 'Freehand'.
Since:
  • 23.07

rect :Rect2

A rectangle that represents different types of annotations. (except for 'Freehand')
Meaning for each type of annotation:
- Rectangle: The rectangle itself
- Oval: The out-bound rectangle of the oval
- Line: x0, y0 as start point, x1, y1 as end point
- Arrow: x0, y0 as start point, x1, y1 as end point
- Note: x0, y0 as the location for note, x1, y1 should be identical as x0, y0
- Highlight: The rectangle of the highlight
- Freehand: The out-bound rectangle of the highlight. Freehand's annotation data is defined by .points

If both .rect and .boundingBox are presented, .rect will be used prior to .boundingBox.
Since:
  • 23.07

title :String

The annotation's title that will be drawn on the editor document view. Provided by web-view
Since:
  • 22.11

type :string

Annotation type in [ 'Rectangle' | 'Oval' | 'Highlight' | 'Line' | 'Arrow' | 'Freehand' | 'Note' ]
Since:
  • 23.07