Repository navigation
Release v2.6.0
A canvas can now share where the pointer is with one hook, instead of each application writing its own presence code.
Added
useCanvasPresencein@cratis/choreography/collaboration/reactshares this session's position on a canvas: it holds the room's connection while the canvas is mounted, announces the canvas as soon as it opens, maps the pointer into content space, follows the content under a pointer that stands still while the canvas pans or zooms, and leaves the area when the canvas closes. Wire itshandlePointerMoveonto the canvas and callhandleTransformChangewhen it pans or zooms. See Send the pointer position.contentPointOfandreportCanvasPresencein@cratis/choreography/collaborationdo the same steps without React, andPresenceSinkdescribes what they send to.