ShapeEditor

Shape editor.

Constructor

new ShapeEditor(app)

Parameters:
NameTypeDescription
appApp

The associated application.

Classes

ShapeEditor

Methods

disable()

Disable the editor. Redraws the layer.

enable()

Enable the editor. Redraws the layer.

getShape() → {object}

Get the edited shape.

Returns:

The edited shape.

Type: 
object

isActive() → {boolean}

Get the active flag.

Returns:

The active flag.

Type: 
boolean

resetAnchors()

Reset the anchors.

setAnchorsActive(flag)

Set anchors active.

Parameters:
NameTypeDescription
flagboolean

The active (on/off) flag.

setDrawEventCallback(callback)

Set the draw event callback.

Parameters:
NameTypeDescription
callbackobject

The callback.

setFactoryList(list)

Set the tool options.

Parameters:
NameTypeDescription
listArray

The list of shape classes.

setShape(inshape)

Set the shape to edit.

Parameters:
NameTypeDescription
inshapeobject

The shape to edit.

setViewController(vc)

Set the associated image.

Parameters:
NameTypeDescription
vcobject

The associated view controller.