A Svelte action: track one pointer from press to release, scale-corrected.
<div class="touch-none select-none" use:pointerDrag={{ onstart, onmove }}></div>
It captures the pointer on press, so the drag keeps reporting when the pointer leaves the
element, and follows one pointer at a time — a second finger is ignored until the first
lifts. Deltas are divided by measureDragRatio, taken once at the press.
What it deliberately leaves to the caller: which axis, a threshold before a drag counts,
momentum, and stopping the page scrolling or selecting text. The last is CSS —
touch-none select-none on the element — and belongs in the markup, where a reader of the
component can see it.
A scale-corrected pointer drag, and the measurement under it (MICA-294).
The phone is drawn through a
transform: scale(), so a drag that applies client-pixel deltas 1:1 slides out from under the pointer at any size but 100%. The shell has always corrected for that; an app could not, because the shell's gestures are not the SDK's, and Places carried a private copy of the measurement to pan its map. Same kind of thing asfocusTrapabove — DOM behaviour, no host, no permission — so it lives here and reaches both barrels.sdk/lib/pointerDrag.tshas why it is deliberately not a facet.