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