simvx.core.input.drag¶
The drag threshold: how far a pointer travels from its press before the motion is a drag.
A setting on the tree, which every node inherits, and on any node, which its
subtree inherits, per pointer type: a finger lands a good deal further from
where it meant to than a mouse does, and a pen sits between them. The router
reads it once per press, from the node that took the press, and every event of
that press carries the answer as PointerEvent.dragging.
Module Contents¶
Functions¶
Coerce a |
Data¶
API¶
- simvx.core.input.drag.__all__¶
[‘DEFAULT_DRAG_THRESHOLD’, ‘drag_threshold_map’]
- simvx.core.input.drag.DEFAULT_DRAG_THRESHOLD: collections.abc.Mapping[simvx.core.input.enums.PointerType, float]¶
None
- simvx.core.input.drag.drag_threshold_map(value: collections.abc.Mapping[simvx.core.input.enums.PointerType | str, float] | None) dict[simvx.core.input.enums.PointerType, float] | None[source]¶
Coerce a
drag_thresholdassignment:None, or a map from pointer type to distance.Keys take the member or its plain string (
{"touch": 16}), and a type the map leaves out is inherited. A negative distance or an unknown type raises naming what is allowed.