marker.js 3 Documentation
    Preparing search index...

    Class CoverMarker

    Cover marker is a filled rectangle marker.

    A typical use case is to cover some area of the image with a colored rectangle as a "redaction".

    Hierarchy (View Summary)

    Index

    Accessors

    • get container(): SVGGElement

      SVG container object holding the marker's visual.

      Returns SVGGElement

    Constructors

    Methods

    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'

    Marker's fill color.

    _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 = false

    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).

    height: number = 0

    Marker height.

    left: number = 0

    x coordinate of the top-left corner.

    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.

    rotationAngle: number = 0

    Marker's rotation angle.

    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).

    title: string = 'Cover marker'

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

    top: number = 0

    y coordinate of the top-left corner.

    typeName: string = 'CoverMarker'

    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.

    width: number = 0

    Marker width.