@mocanvas/editor · interface
interface TLUpdatePointerOptionsHow to move the editor's idea of where the pointer is without a real pointer event having arrived.
The case this exists for is a change that moves the world under a stationary cursor — a camera animation, an undo that moves a shape, a page switch. The pointer has not moved on screen, but it is over something different now, and hover, hit testing and the active tool all need to be told.
SEMANTICS-ASSUMED: the fields. The docs name the options bag but not its members, so it carries the two things a caller can actually know — a screen position to use instead of the last one, and whether the update should run even when nothing appears to have changed.
Properties · 2
force?: booleanRe-run the update even when the pointer resolves to the same page point. Needed after a change that moved shapes rather than the camera.
screenPoint?: VecModelContainer-relative point to treat as the pointer position. Defaults to the last position an event reported.
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.