Skip to content

Release v2.6.0

Choose a tag to compare

@github-actions github-actions released this 11 Nov 20:16
946a380

A canvas can now share where the pointer is with one hook, instead of each application writing its own presence code.

Added

  • useCanvasPresence in @cratis/choreography/collaboration/react shares 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 its handlePointerMove onto the canvas and call handleTransformChange when it pans or zooms. See Send the pointer position.
  • contentPointOf and reportCanvasPresence in @cratis/choreography/collaboration do the same steps without React, and PresenceSink describes what they send to.