Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LinearMarkerBase

LinearMarkerBase is a base class for all line-type markers (Line, Arrow, Measurement Tool, etc.).

Hierarchy

Index

Constructors

constructor

Properties

Protected _container

_container: SVGGElement

Protected _outerContainer

_outerContainer: SVGGElement

Protected defaultLength

defaultLength: number = 50

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

Optional notes

notes: string

Additional information about the marker

onMarkerCreated

onMarkerCreated: (marker: MarkerBase) => void

Method called when marker creation is finished.

Type declaration

Protected visual

visual: SVGGraphicsElement

Marker's main visual.

Protected x1

x1: number = 0

x coordinate of the first end-point

Protected x2

x2: number = 0

x coordinate of the second end-point

Protected y1

y1: number = 0

y coordinate of the first end-point

Protected y2

y2: number = 0

y coordinate of the second end-point

Static title

title: string

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

Static typeName

typeName: string = "MarkerBase"

String type name of the marker type.

Used when adding MarkerView.availableMarkerTypes via a string and to save and restore state.

Accessors

container

  • get container(): SVGGElement
  • SVG container object holding the marker's visual.

    Returns SVGGElement

outerContainer

  • get outerContainer(): SVGGElement
  • Outer SVG group container not manipulated or transformed by the marker itself in any way

    Returns SVGGElement

Methods

Protected addMarkerVisualToContainer

  • addMarkerVisualToContainer(element: SVGElement): void
  • Adds marker's root visual element to the container group.

    Parameters

    • element: SVGElement

      marker's visual element.

    Returns void

Protected adjustVisual

  • adjustVisual(): void
  • When implemented adjusts marker visual after manipulation when needed.

    Returns void

dblClick

  • dblClick(point: IPoint, target?: EventTarget): void
  • Handles pointer (mouse, touch, stylus, etc.) double click event.

    Parameters

    • point: IPoint

      event coordinates.

    • Optional target: EventTarget

      direct event target element.

    Returns void

deselect

  • deselect(): void

dispose

  • dispose(): void

ownsTarget

  • ownsTarget(el: EventTarget): boolean
  • Returns true if passed SVG element belongs to the marker. False otherwise.

    Parameters

    • el: EventTarget

      target element.

    Returns boolean

pointerDown

  • pointerDown(point: IPoint, target?: EventTarget): void
  • Handles pointer (mouse, touch, stylus, etc.) down event.

    Parameters

    • point: IPoint

      event coordinates.

    • Optional target: EventTarget

      direct event target element.

    Returns void

pointerUp

  • pointerUp(point: IPoint): void
  • Handles pointer (mouse, touch, stylus, etc.) up event.

    Parameters

    • point: IPoint

      event coordinates.

    Returns void

Protected resize

  • Resizes the line marker.

    Parameters

    • point: IPoint

      current manipulation coordinates.

    Returns void

restoreState

scale

  • scale(scaleX: number, scaleY: number): void
  • Scales marker. Used after the image resize.

    Parameters

    • scaleX: number

      horizontal scale

    • scaleY: number

      vertical scale

    Returns void

select

  • select(): void

Generated using TypeDoc