Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Settings

Default settings for marker.js 2 markers.

Hierarchy

  • Settings

Index

Properties

defaultCaptionFontSize

defaultCaptionFontSize: string = "1rem"

Default font size for the CaptionFrameMarker

since

2.29.0

defaultCaptionText

defaultCaptionText: string = "Text"

Default caption text for the CaptionFrameMarker

since

2.29.0

defaultColor

defaultColor: string = this.defaultColorSet[0]

Default foreground color.

defaultColorSet

defaultColorSet: ColorSet = ['#EF4444', // red'#10B981', // green'#2563EB', // blue'#FFFF00', // yellow'#7C3AED', // purple'#F472B6', // pink'#000000', // black'#FFFFFF' //white]

List of colors used in color pickers.

defaultColorsFollowCurrentColors

defaultColorsFollowCurrentColors: boolean = false

If set to true, when colors on a marker are changed it changes the default color for other markers as well.

since

2.7.0

defaultFillColor

defaultFillColor: string = this.defaultColorSet[0]

Default fill color.

defaultFontFamilies

defaultFontFamilies: string[] = ['Times, "Times New Roman", serif','Helvetica, Arial, sans-serif','Courier, "Courier New", monospace','cursive','fantasy']

Font family options.

defaultFontFamily

defaultFontFamily: string = "Helvetica, Arial, sans-serif"

Default font family for text-based markers (eg. TextMarker and CalloutMarker).

defaultHighlightColor

defaultHighlightColor: string = this.defaultColorSet[3]

Default highlighter color.

defaultHighlightOpacity

defaultHighlightOpacity: number = 0.5

Default opacity (alpha) of the HighlightMarker (and other highlighters).

defaultOpacitySteps

defaultOpacitySteps: number[] = [0.1, 0.25, 0.5, 0.75, 1]

Opacity options.

defaultStrokeColor

defaultStrokeColor: string = this.defaultColorSet[7]

Default stroke color for markers with background (eg. CalloutMarker).

defaultStrokeDasharray

defaultStrokeDasharray: string = ""

Default line dash array

defaultStrokeDasharrays

defaultStrokeDasharrays: string[] = ['', '3', '12 3', '9 6 3 6']

Stroke dash array options.

defaultStrokeWidth

defaultStrokeWidth: number = 3

Default stroke (line) width.

defaultStrokeWidths

defaultStrokeWidths: number[] = [1, 2, 3, 5, 10]

Stroke (line) width options.

defaultText

defaultText: string = "Your text here"

Default text for the TextMarker based markers

since

2.32.0

disableRotation

disableRotation: boolean = false

When set to true rotation feature is disabled on markers. This doesn't affect markers restored from a previously saved state.

since

2.22.0

displayMode

displayMode: DisplayMode = "inline"

Default display mode.

freehandPixelRatio

freehandPixelRatio: number = 1

Increase this setting for smoother FreehandMarker lines. Note that it will also take more space when you save the state.

since

2.20.0

newFreehandMarkerOnPointerUp

newFreehandMarkerOnPointerUp: boolean = false

Create a new Freehand marker for every stroke.

popupMargin

popupMargin: number = 30

Margin in pixels between marker.js popup UI and window borders.

Optional uiOffsetLeft

uiOffsetLeft: number

If set, the UI will be offset by the specified number of pixels on the left.

since

2.31.0

Optional uiOffsetTop

uiOffsetTop: number

If set, the UI will be offset by the specified value, otherwise it will be offset by -toolbarHeight or 0 if there's less space than toolbarHeight on top.

Use this if you want to control the position inside a position: relative parent, as auto-calculation will calculate available space from the relative container and not the whole page.

Common usage when used with a relatively positioned parent would be:

markerArea.targetRoot = document.getElementById('relativeParent');
markerArea.settings.uiOffsetTop = -markerArea.styles.settings.toolbarHeight;

This would ensure that the toolbar is placed above the image even if the image's offset from the relative parent is 0.

since

2.28.0

wrapText

wrapText: boolean = false

Enable word wrapping in text markers (TextMarker, CalloutMarker)

since

2.30.0

Generated using TypeDoc