An object literal describing a decoration. A decoration is a Pattern that is positioned once at a relative location along a line.

Since

2018.1

Hierarchy

  • Decoration

Properties

alignment?: "left" | "center" | "right"

Determines how the pattern is aligned to its location. For example, if you use "center", the middle of the pattern will coincide with the specified location. If you use "right", the right of the pattern will coincide with the specified location. This means that it will appear at the left of the location. If it is not defined, the alignment is automatically determined: "left" if the location is 0, "right" if the location is 1, and "center" otherwise.

This property is optional.

location: number

The location at which to position the pattern. This location is a relative position on the stroked line. It is a value in the [0, 1] interval, where 0 means the start of the line and 1 means the end of the line.

pattern: Pattern

The Pattern that is positioned at location.