Skip to content

Handler

Handler

Extended by

Constructors

new Handler()

new Handler(id, options?): Handler

Parameters

id: string

options?: Partial<HandlerOptions>

Returns

Handler

Source

editor.ts:1440

Properties

dragPoint

dragPoint: number[]

Source

editor.ts:1438


dragStartPoint

dragStartPoint: number[]

Source

editor.ts:1437


dragging

dragging: boolean

Source

editor.ts:1436


id

id: string

Source

editor.ts:1434


options

options: HandlerOptions

Source

editor.ts:1435

Methods

activate()

activate(editor): void

Activate the handler

Parameters

editor: Editor

Returns

void

Source

editor.ts:1473


complete()

complete(editor): void

Trigger when the handler action is complete

Parameters

editor: Editor

Returns

void

Source

editor.ts:1464


deactivate()

deactivate(editor): void

Deactivate the handler

Parameters

editor: Editor

Returns

void

Source

editor.ts:1481


drawDragging()

drawDragging(editor, e): void

Draw dragging

Parameters

editor: Editor

e: CanvasPointerEvent

Returns

void

Source

editor.ts:1597


drawHovering()

drawHovering(editor, e): void

Draw hovering

Parameters

editor: Editor

e: CanvasPointerEvent

Returns

void

Source

editor.ts:1592


drawSelection()

drawSelection(editor): void

Draw ghost for the selected shape

Parameters

editor: Editor

Returns

void

Source

editor.ts:1587


finalize()

finalize(editor, e): void

Finalize handler

Parameters

editor: Editor

e: CanvasPointerEvent

Returns

void

Source

editor.ts:1518


initialize()

initialize(editor, e): void

Initialize handler

Parameters

editor: Editor

e: CanvasPointerEvent

Returns

void

Source

editor.ts:1503


keyDown()

keyDown(editor, e): boolean

keyDown

Parameters

editor: Editor

e: KeyboardEvent

Returns

boolean

Source

editor.ts:1569


keyUp()

keyUp(editor, e): void

keyUp

Parameters

editor: Editor

e: KeyboardEvent

Returns

void

Source

editor.ts:1582


onActionPerformed()

onActionPerformed(editor): void

Triggered when action is performed (unclude undo and redo)

Parameters

editor: Editor

Returns

void

Source

editor.ts:1498


onActivate()

onActivate(editor): void

Triggered when activated

Parameters

editor: Editor

Returns

void

Source

editor.ts:1488


onDeactivate()

onDeactivate(editor): void

Triggered when deactivate

Parameters

editor: Editor

Returns

void

Source

editor.ts:1493


pointerDown()

pointerDown(editor, e): void

pointerDown

Parameters

editor: Editor

e: CanvasPointerEvent

Returns

void

Source

editor.ts:1523


pointerMove()

pointerMove(editor, e): void

pointerMove

Parameters

editor: Editor

e: CanvasPointerEvent

Returns

void

Abstract

Source

editor.ts:1552


pointerUp()

pointerUp(editor, e): void

pointerUp

Parameters

editor: Editor

e: CanvasPointerEvent

Returns

void

Abstract

Source

editor.ts:1539


reset()

reset(): void

Reset the states of handler

Returns

void

Source

editor.ts:1455


update()

update(editor, e): void

Update handler

Parameters

editor: Editor

e: CanvasPointerEvent

Returns

void

Source

editor.ts:1508


updateHovering()

updateHovering(editor, e): void

Update handler when hovering (not dragging)

Parameters

editor: Editor

e: CanvasPointerEvent

Returns

void

Source

editor.ts:1513