@mocanvas/editor · function

trackPointer

declare function trackPointer(source: PointerSource): {
    pointer: Signal<PointLike>;
    stop: () => void;
}

Mirror an editor's page-space pointer into a signal, so createPresenceStateDerivation can broadcast a cursor that moves.

Call stop() when the editor goes away.

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.