Constructor
new ShapeEditor(app)
Parameters:
Name | Type | Description |
---|---|---|
app | App | The associated application. |
- Source
Classes
Methods
disable()
Disable the editor. Redraws the layer.
- Source
enable()
Enable the editor. Redraws the layer.
- Source
getShape() → {Konva.Shape}
Get the edited shape.
- Source
Returns:
The edited shape.
- Type:
- Konva.
Shape
isActive() → {boolean}
Get the active flag.
- Source
Returns:
The active flag.
- Type:
- boolean
reset()
Reset the editor.
- Source
resetAnchors()
Reset the anchors.
- Source
setAnchorsActive(flag)
Set anchors active.
Parameters:
Name | Type | Description |
---|---|---|
flag | boolean | The active (on/off) flag. |
- Source
setDrawEventCallback(callback)
Set the draw event callback.
Parameters:
Name | Type | Description |
---|---|---|
callback | eventFn | The callback. |
- Source
setFactoryList(list)
Set the tool options.
Parameters:
Name | Type | Description |
---|---|---|
list | Array | The list of shape classes. |
- Source
setShape(inshape, drawLayer, viewController)
Set the shape to edit.
Parameters:
Name | Type | Description |
---|---|---|
inshape | Konva. | The shape to edit. |
drawLayer | DrawLayer | The associated draw layer. |
viewController | ViewController | The associated view controller. |
- Source