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() → {object}
Get the edited shape.
- Source
Returns:
The edited shape.
- Type:
- object
isActive() → {boolean}
Get the active flag.
- Source
Returns:
The active flag.
- Type:
- boolean
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 | object | The callback. |
- Source
setFactoryList(list)
Set the tool options.
Parameters:
Name | Type | Description |
---|---|---|
list | Array | The list of shape classes. |
- Source
setShape(inshape)
Set the shape to edit.
Parameters:
Name | Type | Description |
---|---|---|
inshape | object | The shape to edit. |
- Source
setViewController(vc)
Set the associated image.
Parameters:
Name | Type | Description |
---|---|---|
vc | object | The associated view controller. |
- Source