DrawShapeHandler
Source: drawShapeHandler.js:46
Draw shape handler: handle action on existing shapes.
Constructor
new DrawShapeHandler(app: App): DrawShapeHandlerParameters
app(App) — The associated application.
Instance Methods
setEditorShape(shape: Konva.Shape, drawLayer: DrawLayer)
Set the draw editor shape.
Parameters
shape(Konva.Shape) — The shape to edit.drawLayer(DrawLayer) — The layer the shape belongs to.
getEditorShapeGroup(): Konva.Group | undefined
Get the currently edited shape group.
Returns
Konva.Group | undefined— The edited group.
getEditorAnnotation(): Annotation | undefined
Get the currently edited annotation.
Returns
Annotation| undefined— The edited annotation.
disableAndResetEditor()
Disable and reset the shape editor.
storeMouseOverCursor(cursor: string)
Store specific mouse over cursor.
Parameters
cursor(string) — The cursor name.
onMouseOutShapeGroup()
Handle shape group mouseout.
addShapeGroupListeners(
shapeGroup: Konva.Group,
annotation: Annotation,
drawLayer: DrawLayer,
)
Add shape group listeners.
Parameters
shapeGroup(Konva.Group) — The shape group to set on.annotation(Annotation) — The associated annotation.drawLayer(DrawLayer) — The origin draw layer.
removeShapeListeners(shapeGroup: Konva.Group)
Remove shape group listeners.
Parameters
shapeGroup(Konva.Group) — The shape group to set off.