DrawShapeHandler

Draw shape handler: handle action on existing shapes.

Constructor

new DrawShapeHandler(app, eventCallback)

Parameters:
NameTypeDescription
appApp

The associated application.

eventCallbackfunction

Event callback.

Classes

DrawShapeHandler

Methods

addShapeGroupListeners(shapeGroup, annotation, drawLayer)

Add shape group listeners.

Parameters:
NameTypeDescription
shapeGroupKonva.Group

The shape group to set on.

annotationAnnotation

The associated annotation.

drawLayerDrawLayer

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:
NameTypeDescription
shapeGroupKonva.Group

The shape group to set off.

setEditorShape(shape, drawLayer)

Set the draw editor shape.

Parameters:
NameTypeDescription
shapeKonva.Shape

The shape to edit.

drawLayerDrawLayer

The layer the shape belongs to.

storeMouseOverCursor(cursor)

Store specific mouse over cursor.

Parameters:
NameTypeDescription
cursorstring

The cursor name.