Skip to content

EraserHandler

Eraser Handler

Extends

Constructors

new EraserHandler()

new EraserHandler(id, options?): EraserHandler

Parameters

id: string

options?: Partial<HandlerOptions>

Returns

EraserHandler

Inherited from

Handler.constructor

Source

editor.ts:1428

Properties

deletingShapes

deletingShapes: Shape[] = []

Source

handlers/eraser-handler.ts:18


dragPoint

dragPoint: number[]

Source

handlers/eraser-handler.ts:15


dragStartPoint

dragStartPoint: number[]

Source

handlers/eraser-handler.ts:14


dragging

dragging: boolean = false

Source

handlers/eraser-handler.ts:13


dx

dx: number = 0

Source

handlers/eraser-handler.ts:16


dy

dy: number = 0

Source

handlers/eraser-handler.ts:17


id

id: string

Inherited from

Handler.id

Source

editor.ts:1425


options

options: HandlerOptions

Inherited from

Handler.options

Source

editor.ts:1426

Methods

activate()

activate(editor): void

Activate the handler

Parameters

editor: Editor

Returns

void

Inherited from

Handler.activate

Source

editor.ts:1454


addToDeletingShapes()

addToDeletingShapes(editor, point): void

Parameters

editor: Editor

point: number[]

Returns

void

Source

handlers/eraser-handler.ts:29


complete()

complete(editor): void

Trigger when the handler action is complete

Parameters

editor: Editor

Returns

void

Inherited from

Handler.complete

Source

editor.ts:1445


deactivate()

deactivate(editor): void

Deactivate the handler

Parameters

editor: Editor

Returns

void

Inherited from

Handler.deactivate

Source

editor.ts:1462


drawSelection()

drawSelection(editor): void

Draw ghost for the selected shape

Parameters

editor: Editor

Returns

void

Inherited from

Handler.drawSelection

Source

editor.ts:1507


finalize()

finalize(editor, e): void

Parameters

editor: Editor

e: CanvasPointerEvent

Returns

void

Source

handlers/eraser-handler.ts:52


initialize()

initialize(editor, e): void

Parameters

editor: Editor

e: CanvasPointerEvent

Returns

void

Source

handlers/eraser-handler.ts:43


keyDown()

keyDown(editor, e): boolean

keyDown

Parameters

editor: Editor

e: KeyboardEvent

Returns

boolean

Overrides

Handler.keyDown

Source

handlers/eraser-handler.ts:105


keyUp()

keyUp(editor, e): void

keyUp

Parameters

editor: Editor

e: KeyboardEvent

Returns

void

Inherited from

Handler.keyUp

Source

editor.ts:1502


onActivate()

onActivate(editor): void

Triggered when activated

Parameters

editor: Editor

Returns

void

Overrides

Handler.onActivate

Source

handlers/eraser-handler.ts:115


onDeactivate()

onDeactivate(editor): void

Triggered when deactivate

Parameters

editor: Editor

Returns

void

Overrides

Handler.onDeactivate

Source

handlers/eraser-handler.ts:119


pointerDown()

pointerDown(editor, e): void

handle pointer down event

Parameters

editor: Editor

e: CanvasPointerEvent

Returns

void

Overrides

Handler.pointerDown

Source

handlers/eraser-handler.ts:67


pointerMove()

pointerMove(editor, e): void

handle pointer move event

Parameters

editor: Editor

e: CanvasPointerEvent

Returns

void

Overrides

Handler.pointerMove

Source

handlers/eraser-handler.ts:82


pointerUp()

pointerUp(editor, e): void

handle pointer up event

Parameters

editor: Editor

e: CanvasPointerEvent

Returns

void

Overrides

Handler.pointerUp

Source

handlers/eraser-handler.ts:96


reset()

reset(): void

Reset the states of handler

Returns

void

Overrides

Handler.reset

Source

handlers/eraser-handler.ts:20


update()

update(editor, e): void

Parameters

editor: Editor

e: CanvasPointerEvent

Returns

void

Source

handlers/eraser-handler.ts:48