DrawShapeEditor

Draw shape editor.

Constructor

new DrawShapeEditor(app, eventCallback)

Parameters:
NameTypeDescription
appApp

The associated application.

eventCallbackfunction

Event callback.

Classes

DrawShapeEditor

Methods

disable()

Disable the editor. Redraws the layer.

enable()

Enable the editor. Redraws the layer.

getAnnotation() → {Annotation}

Get the edited annotation.

Returns:

The annotation.

Type: 
Annotation

getShape() → {Konva.Shape}

Get the edited shape.

Returns:

The edited shape.

Type: 
Konva.Shape

isActive() → {boolean}

Get the active flag.

Returns:

The active flag.

Type: 
boolean

reset()

Reset the editor.

resetAnchors()

Reset the anchors.

setAnchorsActive(flag)

Set anchors active.

Parameters:
NameTypeDescription
flagboolean

The active (on/off) flag.

setShape(inshape, drawLayer, annotation)

Set the shape to edit.

Parameters:
NameTypeDescription
inshapeKonva.Shape

The shape to edit.

drawLayerDrawLayer

The associated draw layer.

annotationAnnotation

The associated annotation.