DWVv0.37.0

Brush

Source: brush.js:14

Brush class.


Constructor

new Brush(app: App): Brush

Parameters

  • app (App) — The associated application.

Instance Methods

activate(bool: boolean)

Activate the tool.

Parameters

  • bool (boolean) — The flag to activate or not.

setFeatures(features: object)

Set the tool live features. See the documentation of the class members for details.

Parameters

  • features (object) — The list of features.

init()

Initialise the tool.

getEventNames(): Array

Get the list of event names that this tool can fire.

Returns

  • Array — The list of event names.

getHelpKeys(): object

Help for this tool.

Returns

  • object — The help content.

Instance Fields

keydown

Handle key down event.

Parameters

  • event (object) — The key down event.

contextmenu

Handle context menu event: prevents the browser menu so that the right button can be used by the tool.

Parameters

  • event (MouseEvent) — The context menu event.