Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CurveMarker

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 selectorCurve

selectorCurve: SVGPathElement

Invisible wider curve to make selection easier/possible.

Protected strokeColor

strokeColor: string = "transparent"

Line color.

Protected strokeDasharray

strokeDasharray: string = ""

Line dash array.

Protected strokeWidth

strokeWidth: number = 0

Line width.

Protected visibleCurve

visibleCurve: SVGPathElement

Visible marker curve.

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 = "Curve marker"

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

Static typeName

typeName: string = "CurveMarker"

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

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

Protected resize

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

Protected setStrokeColor

  • setStrokeColor(color: string): void
  • Sets line color.

    Parameters

    • color: string

      new color.

    Returns void

Protected setStrokeDasharray

  • setStrokeDasharray(dashes: string): void
  • Sets line dash array.

    Parameters

    • dashes: string

      new dash array.

    Returns void

Protected setStrokeWidth

  • setStrokeWidth(width: number): void
  • Sets line width.

    Parameters

    • width: number

      new width.

    Returns void

Generated using TypeDoc