Skip to main content
Element describes the common metadata of all visible elements in a note file (and in document annotation scenarios), such as strokes, titles, links, TextBox, geometries, and pictures. An Element uses type to distinguish its category and provides more specific structures under the corresponding fields (e.g. stroke, title, link, textBox, geometry, picture).
If you only care about the element category, read type. If you need to operate on the content, read typed fields such as stroke/title/link/textBox/geometry based on type.

Type Constants

ElementType defines the value range of Element.type.

ElementType

In the table below, the ElementType. prefix is omitted in the Constant column. In code, use the full name: ElementType.XXX.

Fields

angles and contoursSrc are accessor objects, not full arrays. Fetch data asynchronously via size()/get()/getRange() to avoid JS memory issues caused by transferring large point sets at once.

FiveStar (Five-star)

When type === 800, the fiveStar field provides the point set of the five-star element.

Methods