Constructor
new DrawShapeEditor(app, eventCallback)
Parameters:
Name | Type | Description |
---|---|---|
app | App | The associated application. |
eventCallback | function | Event callback. |
Classes
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:
Name | Type | Description |
---|---|---|
flag | boolean | The active (on/off) flag. |
setShape(inshape, drawLayer, annotation)
Set the shape to edit.
Parameters:
Name | Type | Description |
---|---|---|
inshape | Konva. | The shape to edit. |
drawLayer | DrawLayer | The associated draw layer. |
annotation | Annotation | The associated annotation. |