Primitives / foldkit-primitives/dom

DRAGGING

namespace · packages/primitives/src/dom/pointer-drag.ts:72

const DRAGGING = { x, y, kind }

What a drag under way writes on the document's root, for something that follows the pointer to read without the view drawing again on every move: the pointer's viewport position in pixels (x, y), and its kind (mouse, touch or pen) as the kind attribute. All are removed when the drag ends.

In the guides

Members

DRAGGING.x

const · packages/primitives/src/dom/pointer-drag.ts:73

x: '--fk-drag-x'

DRAGGING.y

const · packages/primitives/src/dom/pointer-drag.ts:74

y: '--fk-drag-y'

DRAGGING.kind

const · packages/primitives/src/dom/pointer-drag.ts:75

kind: 'data-fk-drag'