EraserHandler
Eraser Handler
Extends
Constructors
new EraserHandler()
new EraserHandler(
id
,options
?):EraserHandler
Parameters
• id: string
• options?: Partial
<HandlerOptions
>
Returns
Inherited from
Source
Properties
deletingShapes
deletingShapes:
Shape
[] =[]
Source
dragPoint
dragPoint:
number
[]
Source
dragStartPoint
dragStartPoint:
number
[]
Source
dragging
dragging:
boolean
=false
Source
dx
dx:
number
=0
Source
dy
dy:
number
=0
Source
id
id:
string
Inherited from
Source
options
options:
HandlerOptions
Inherited from
Source
Methods
activate()
activate(
editor
):void
Activate the handler
Parameters
• editor: Editor
Returns
void
Inherited from
Source
addToDeletingShapes()
addToDeletingShapes(
editor
,point
):void
Parameters
• editor: Editor
• point: number
[]
Returns
void
Source
complete()
complete(
editor
):void
Trigger when the handler action is complete
Parameters
• editor: Editor
Returns
void
Inherited from
Source
deactivate()
deactivate(
editor
):void
Deactivate the handler
Parameters
• editor: Editor
Returns
void
Inherited from
Source
drawSelection()
drawSelection(
editor
):void
Draw ghost for the selected shape
Parameters
• editor: Editor
Returns
void
Inherited from
Source
finalize()
finalize(
editor
,e
):void
Parameters
• editor: Editor
• e: CanvasPointerEvent
Returns
void
Source
initialize()
initialize(
editor
,e
):void
Parameters
• editor: Editor
• e: CanvasPointerEvent
Returns
void
Source
keyDown()
keyDown(
editor
,e
):boolean
keyDown
Parameters
• editor: Editor
• e: KeyboardEvent
Returns
boolean
Overrides
Source
handlers/eraser-handler.ts:105
keyUp()
keyUp(
editor
,e
):void
keyUp
Parameters
• editor: Editor
• e: KeyboardEvent
Returns
void
Inherited from
Source
onActivate()
onActivate(
editor
):void
Triggered when activated
Parameters
• editor: Editor
Returns
void
Overrides
Source
handlers/eraser-handler.ts:115
onDeactivate()
onDeactivate(
editor
):void
Triggered when deactivate
Parameters
• editor: Editor
Returns
void
Overrides
Source
handlers/eraser-handler.ts:119
pointerDown()
pointerDown(
editor
,e
):void
handle pointer down event
Parameters
• editor: Editor
• e: CanvasPointerEvent
Returns
void
Overrides
Source
pointerMove()
pointerMove(
editor
,e
):void
handle pointer move event
Parameters
• editor: Editor
• e: CanvasPointerEvent
Returns
void
Overrides
Source
pointerUp()
pointerUp(
editor
,e
):void
handle pointer up event
Parameters
• editor: Editor
• e: CanvasPointerEvent
Returns
void
Overrides
Source
reset()
reset():
void
Reset the states of handler
Returns
void
Overrides
Source
update()
update(
editor
,e
):void
Parameters
• editor: Editor
• e: CanvasPointerEvent
Returns
void