# `DragMove`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

Interface · `import type { DragMove } from '@holostep-configurators/runtime-client/contract';` · labs, `@experimental` · since 2.0.0 · section 11. Input and drag

One frame of a drag. A drag moves a unit: for a model part, the outermost ModelNode the drag's
query names that contains it (a `space: 'parent'` child moves with its matched parent), else
its own root ([`node(part.node)`](Writer.node.md)); for a collection part, its item. [`part`](DragMove.part.md) is that unit and every
pose is its world pose.

## Members

| Member | Kind | Summary |
| --- | --- | --- |
| <a id="part"></a>[`part`](DragMove.part.md) | property | The dragged unit: a model's root, or a collection item. |
| <a id="pose"></a>[`pose`](DragMove.pose.md) | property | World pose: the pointer on `on`, plus the grab offset. |
| <a id="at"></a>[`at`](DragMove.at.md) | property | The pointer, CSS px from the element's top-left corner. |
| <a id="ray"></a>[`ray`](DragMove.ray.md) | property | The world ray under the pointer: aim with it (`/math` ray and plane helpers). |
| <a id="phase"></a>[`phase`](DragMove.phase.md) | property | 'rest': the pointer has not moved since the last frame. |
| <a id="dtms"></a>[`dtMs`](DragMove.dtMs.md) | property | Milliseconds since the previous call. |

## Declaration

```ts
export interface DragMove {
  readonly part: Part<CommitOptions>;
  readonly pose: Pose;
  readonly at: ScreenPoint;
  readonly ray: Ray;
  readonly phase: 'start' | 'move' | 'rest' | 'end' | 'other';
  readonly dtMs: number;
}
```

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `DragMove` names no product |
| 2. A precedent | pass: [Babylon.js PointerDragBehavior (startDrag, onDragObservable, validateDrag)](https://github.com/BabylonJS/Babylon.js/blob/master/packages/dev/core/src/Behaviors/Meshes/pointerDragBehavior.ts) (row `G1`); [jQuery UI draggable (drag, revert)](https://api.jqueryui.com/draggable/) (row `G1`) |
| 3. Two apps, or labs | labs (`@experimental` at a stable path, reached through `has()` or `supports()`): it graduates when a second app uses it; apps today: app-04c2774145, app-37356bf09f, app-4762caacdc, app-fc07850558, app-fc306ec3dc |
| 4. The cheaper fix first | decided per need in Appendix B: rows `G1`, `K47` at tier labs, stable (a member only where no rule, data, asset or app code serves the need) |
