DWVv0.37.0

BrushDragBehavior

Source: brushDragBehavior.js:28

Brush painting as a DragBehavior for LayerGroupPointer.


Constructor

new BrushDragBehavior(app: App): BrushDragBehavior

Parameters

  • app (App) — The associated application.

Instance Methods

setFeatures(features: object)

Parameters

canStart(_point: Point2D, layerGroup: LayerGroup): boolean

Parameters

  • _point (Point2D) — The pointer position.
  • layerGroup (LayerGroup) — The layer group under the pointer.

Returns

  • boolean — Whether painting may begin.

onStart( point: Point2D, layerGroup: LayerGroup, pointerStart: DragPointerStartContext | undefined, )

Parameters

onDrag(_drag: DragStep, layerGroup: LayerGroup)

Parameters

onEnd()

Finalize stroke buffers or delegate reset when the drag never activated.

reset()

Reset: end stroke if active and reset.