Constructor
new DrawShapeHandler(app, eventCallback)
Parameters:
Name | Type | Description |
---|---|---|
app | App | The associated application. |
eventCallback | function | Event callback. |
Classes
Methods
addShapeGroupListeners(shapeGroup, annotation, drawLayer)
Add shape group listeners.
Parameters:
Name | Type | Description |
---|---|---|
shapeGroup | Konva. | The shape group to set on. |
annotation | Annotation | The associated annotation. |
drawLayer | DrawLayer | The origin draw layer. |
disableAndResetEditor()
Disable and reset the shape editor.
getEditorAnnotation() → {Annotation|undefined}
Get the currently edited annotation.
Returns:
The edited annotation.
- Type:
- Annotation |
undefined
getEditorShapeGroup() → {Konva.Group|undefined}
Get the currently edited shape group.
Returns:
The edited group.
- Type:
- Konva.
Group |undefined
onMouseOutShapeGroup()
Handle shape group mouseout.
removeShapeListeners(shapeGroup)
Remove shape group listeners.
Parameters:
Name | Type | Description |
---|---|---|
shapeGroup | Konva. | The shape group to set off. |
setEditorShape(shape, drawLayer)
Set the draw editor shape.
Parameters:
Name | Type | Description |
---|---|---|
shape | Konva. | The shape to edit. |
drawLayer | DrawLayer | The layer the shape belongs to. |
storeMouseOverCursor(cursor)
Store specific mouse over cursor.
Parameters:
Name | Type | Description |
---|---|---|
cursor | string | The cursor name. |