BrushDragBehavior
Source: brushDragBehavior.js:28
Brush painting as a DragBehavior for LayerGroupPointer.
Constructor
new BrushDragBehavior(app: App): BrushDragBehaviorParameters
app(App) — The associated application.
Instance Methods
setFeatures(features: object)
Parameters
features(object) — Subset of Brush#setFeatures; brush-onlyblacklistis stored here, the rest is forwarded to BrushMaskPaint#setFeatures.
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
point(Point2D) — The pointer position at drag start.layerGroup(LayerGroup) — The layer group under the pointer.pointerStart(DragPointerStartContext | undefined) — Mouse/touch context from LayerGroupPointer.
onDrag(_drag: DragStep, layerGroup: LayerGroup)
Parameters
_drag(DragStep) — Unused (threshold already applied in DragBehavior#onUpdate).layerGroup(LayerGroup) — The layer group under the pointer.
onEnd()
Finalize stroke buffers or delegate reset when the drag never activated.
reset()
Reset: end stroke if active and reset.