Config

Config

new Config() → {Config~Config}

Instantiates a new configuration object.

Source:

Type Definitions

Config :Object

Available configuration options:

Properties:
Name Type Default Description
topLinkCategory String | "none" "default"

The category of Link to show above the text.

bottomLinkCategory String | "none" "none"

The category of Link to show below the text.

topTagCategory String | "none" "default"

The category of WordTag to show above the text.

bottomTagCategory String | "none" "POS"

The category of WordTag to show below the text.

compactRows Boolean false

Whether or not to lock every Row to its minimum height.

showTopLinksOnMove Boolean true

Continue to display top Links when the user drags Words around.

showBottomLinksOnMove Boolean true

Continue to display bottom Links when the user drags Words around.

showTopMainLabel Boolean true

Display the main type label for top Links.

showTopArgLabels Boolean false

Display the type labels for each argument for top Links.

showBottomMainLabel Boolean true

Display the main type label for bottom Links.

showBottomArgLabels Boolean false

Display the type labels for each argument for bottom Links.

rowEdgePadding Number 10

Padding on the left/right edges of each Row.

rowVerticalPadding Number 20

Padding on the top/bottom of each Row.

rowExtraTopPadding Number 10

Extra padding on Row top for Link labels.
(Labels for top Links are drawn above their line, and it is not trivial to get a good value for how high they are, so swe use a pre-configured value here.)

wordPadding Number 10

Padding on the left of Words.

wordPunctPadding Number 2

Padding on the left of Words that contain a single punctuation character.

wordTopTagPadding Number 10

Padding between Words and the WordTags drawn above them.

wordBottomTagPadding Number 0

Padding between Words and the WordTags drawn below them.

wordTagLineLength Number 9

For WordTags drawn above Words, the height of the connecting line/brace between the Word and the WordTag.

wordBraceThreshold Number 100

Words that are wider than this will have curly braces drawn between them and their WordTags (rather than a single vertical line).

linkSlotInterval Number 40

Vertical distance between each overlapping Link slot.

linkHandlePadding Number 2

Vertical padding between Link handles and their anchors.

linkCurveWidth Number 5

Corner curve width for Link lines.

linkArrowWidth Number 5

Width of arrowheads for Link handles.

tagDefaultColours Array.<String> ...

The first n default colours to use for WordTags (as a queue). After this array is exhausted, WordTags will be assigned random colours by default.
See the source for the pre-configured default values.

Source: