TwoTouchBehavior
Source: twoTouchBehavior.js:15
Two-finger gesture handling for tools that forward into LayerGroupPointer two-touch paths.
Constructor
new TwoTouchBehavior(): TwoTouchBehaviorInstance Methods
isActive(): boolean
Whether two-touch tracking is active (subclasses track gesture state).
Returns
boolean— True when a two-finger gesture is in progress.
reset()
Clear two-touch session state; default is a no-op.
onStart(_points: Array.<Point2D>)
First frame with two simultaneous touches (or equivalent pointers).
Parameters
_points(Array.<Point2D>) — Two touch points.
onUpdate(
_points: Array.<Point2D>,
_layerGroup: LayerGroup,
): boolean
Two-touch move; return value is used for tap vs gesture disambiguation.
Parameters
_points(Array.<Point2D>) — Two touch points._layerGroup(LayerGroup) — The layer group under the touch.
Returns
boolean— True when the gesture counts as movement (for tap).
onEnd()
End two-touch session and reset.