marker.js 3 Documentation
    Preparing search index...

    Class ArrowMarkerEditor<TMarkerType>

    Editor for arrow markers.

    Type Parameters

    Hierarchy (View Summary)

    Index

    Accessors

    • get container(): SVGGElement

      Returns the SVG container for the marker's and editor's visual elements.

      Returns SVGGElement

    • get continuousCreation(): boolean

      When set to true, a new marker of the same type is created immediately after the current one is finished.

      Returns boolean

    • get overlayContainer(): HTMLDivElement

      Overlay container for HTML elements like text editors, etc.

      Returns HTMLDivElement

    Constructors

    Methods

    • Type guard for specific marker editor types.

      This allows to check if the editor is of a specific type which is useful for displaying type-specific UI.

      Type Parameters

      • T

        specific marker editor type.

      Parameters

      • cls: new (...args: any[]) => T

      Returns this is T

    Properties

    _container: SVGGElement

    SVG container for the marker's and editor's visual elements.

    _continuousCreation: boolean = false

    When set to true, a new marker of the same type is created immediately after the current one is finished.

    _controlBox: SVGGElement = ...

    SVG group holding editor's control box.

    _creationStyle: MarkerCreationStyle = 'draw'

    Marker creation style.

    Markers can either be created by drawing them or just dropping them on the canvas.

    _isSelected: boolean = false

    Is this marker selected?

    _marker: TMarkerType

    Marker instance.

    _markerType: new (container: SVGGElement) => TMarkerType

    Marker type constructor.

    Type declaration

      • new (container: SVGGElement): TMarkerType
      • Marker type constructor.

        Parameters

        • container: SVGGElement

        Returns TMarkerType

    _overlayContainer: HTMLDivElement

    Overlay container for HTML elements like text editors, etc.

    _state: MarkerEditorState = 'new'

    Editor's state.

    activeGrip?: ResizeGrip

    Active manipulation grip.

    defaultLength: number = 50

    Default line length when marker is created with a simple click (without dragging).

    grip1?: ResizeGrip

    First manipulation grip

    grip2?: ResizeGrip

    Second manipulation grip.

    isMultiSelected: boolean = false

    Is this marker selected in a multi-selection?

    manipulationBox: SVGGElement = ...

    Container for manipulation grips.

    manipulationStartState?: string

    Marker's state when it is selected

    manipulationStartX: number = 0

    Pointer X coordinate at the start of move or resize.

    manipulationStartY: number = 0

    Pointer Y coordinate at the start of move or resize.

    onMarkerCreated?: <T extends MarkerBaseEditor<MarkerBase>>(editor: T) => void

    Method called when marker creation is finished.

    onStateChanged?: <T extends MarkerBaseEditor<MarkerBase>>(editor: T) => void

    Method to call when marker state changes.