@mocanvas/editor · function

noteReactivePointerType

declare function noteReactivePointerType(pointerType: string | undefined): void

Note the kind of pointer that just produced an event.

The media query alone is not enough: it describes what the machine *has*, and a touchscreen laptop has both. Anything that is not a mouse counts as coarse, so a pen switches the UI to touch sizing too.

SEMANTICS-ASSUMED: the editor's own event plumbing is expected to call this; it is exported so a host driving synthetic input can keep the atom honest.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.