testing.FakeSession.pointer ​Contract 2.0.0 · package sha256
a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e· generated fromtesting.d.tsbyservices/onsite-scripter/scripts/build-contract-docs.mjs; edit the source, not this file.
Method of testing.FakeSession · stable · since 2.0.0
pointer(input: {
kind: 'click' | 'drag' | 'longPress' | 'move';
at: {
x: number;
y: number;
};
to?: {
x: number;
y: number;
};
pointerType?: 'mouse' | 'pen' | 'touch';
durationMs?: number;
pointerId?: number;
}): void;
Simulates canvas input on the fake clock: a press at at, then the path, then the release.
'click' releases at to. 'drag' moves from at to to in 16 ms steps of durationMs
(one step at 0), ticking the clock through each: one 'drag:move' per step, each with the
pose drawn after constrain, dispatched at the next drawn frame. 'longPress' holds
durationMs still (an app timer may call input.startDrag then), then moves in 4 steps.
'move' has no button pressed and fires 'hover' where the part under it changes (a mouse or
pen only). pointerType: 'touch' makes a 'click' a tap (10 CSS px, 300 ms) and never
hovers. at and to: CSS px. Events dispatch at the next drawn frame (frame(), or
tick(16)). A press no drag claims is the camera's gesture: with one pointer down, its path
turns the camera as the runtime's orbit controls do, CameraLimits.rotateSpeed × 360° per
element height (a drag to the left raises azimuthDeg, a drag down lowers polarDeg),
inside the limits, with no damping; 'fixed' mode turns nothing, and 'pan' mode's pan and a
two-pointer pinch move nothing on the fake. Under CameraLimits.gestures: 'cooperative' a
'touch' press whose first move past 10 CSS px is more vertical than horizontal is the page's
scroll, as the browser takes it under touch-action: pan-y: the camera turns nothing, a
part drag it started ends with reason 'cancelled' and no commit, and its release is no
click; a horizontal one, a mouse and a pen behave as under 'greedy'. A real browser may
hand the view the first move past its slop before it cancels the pointer (a few degrees);
the fake turns none.
| Rule | Result |
|---|---|
| 1. Neutral name | pass: pointer names no product |
| 2. A precedent | not recorded: no ledger row (coverage.json) names this member or its owner |
| 3. Two apps, or labs | not recorded: no ledger row names this member or its owner |
| 4. The cheaper fix first | not recorded per member (Appendix B decides it per need) |