OMD Documentation

SelectTool

The SelectTool is a tool for selecting, moving, and deleting stroke segments on the canvas. It extends the Tool class.

Class Definition

export class SelectTool extends Tool {
    // ...
}

Constructor

new SelectTool(canvas, [options])

Creates a new SelectTool instance.

Public Methods

onPointerDown(event)

Handles the pointer down event to start a selection.

onPointerMove(event)

Handles the pointer move event to update the selection box.

onPointerUp(event)

Handles the pointer up event to complete the selection.

onCancel()

Cancels the current selection operation.

onKeyboardShortcut(key, event)

Handles keyboard shortcuts for selection-related actions.

getCursor()

Gets the cursor for the tool.

clearSelection()

Clears the current selection.

Properties

↑ Top