marker.js 3 Documentation
    Preparing search index...

    Class LinearMarkerBase

    Base class for line-like markers.

    Use one of the derived classes.

    Hierarchy (View Summary)

    Index

    Accessors

    • get container(): SVGGElement

      SVG container object holding the marker's visual.

      Returns SVGGElement

    Constructors

    Methods

    • The path representing the line part of the marker visual.

      When implemented in derived class should return SVG path for the marker.

      Returns string

      SVG path for the marker.

    Properties

    _container: SVGGElement

    SVG container object holding the marker's visual.

    It is created and passed to the constructor by marker editor or viewer when creating the marker.

    _fillColor: string = 'transparent'

    Fill color of the marker.

    _opacity: number = 1

    Opacity of the marker.

    _strokeColor: string = 'transparent'

    Stroke (outline) color of the marker.

    _strokeDasharray: string = ''

    Stroke (outline) dash array of the marker.

    _strokeWidth: number = 0

    Stroke (outline) width of the marker.

    applyDefaultFilter: boolean = true

    When true, the default filter is applied to the marker's visual.

    3.2.0

    defaultSize: ISize = ...

    The default marker size when the marker is created with a click (without dragging).

    endTerminatorVisual: undefined | SVGGraphicsElement

    End terminator (ending) visual of the marker.

    lineVisual: undefined | SVGGraphicsElement

    Line visual of the marker.

    notes?: string

    Additional information about the marker.

    Generally, this isn't used for anything functional. However, in a derived type it could be used for storing arbitrary data with no need to create extra properties and state types.

    selectorVisual: undefined | SVGGraphicsElement

    Wider invisible visual to make it easier to select and manipulate the marker.

    stage: MarkerStage = 'normal'

    Marker lifecycle stage.

    Most markers are created immediately after the user clicks on the canvas (normal). However, some markers are only finished creating after additional interactions (creating).

    startTerminatorVisual: undefined | SVGGraphicsElement

    Start terminator (ending) visual of the marker.

    title: string

    Marker type title (display name) used for accessibility and other attributes.

    typeName: string = 'MarkerBase'

    Marker type name.

    It's important to set this in each derived class. This value is used to identify marker types when restoring marker state and other scenarios.

    visibleVisual: undefined | SVGGraphicsElement

    Visible visual of the marker.

    visual: undefined | SVGGraphicsElement

    Marker's main visual.

    x1: number = 0

    x coordinate of the first end-point

    x2: number = 0

    x coordinate of the second end-point

    y1: number = 0

    y coordinate of the first end-point

    y2: number = 0

    y coordinate of the second end-point