Rasterex APINPM Package/docs/components/collaboration/control

Sync Control

Enable or disable real-time synchronization state using the SDK.

Enabling Collaboration

Once the user is identified, the host can enable or disable the collaboration features. When enabled, Canvas connects to the synchronization bridge to broadcast and receive updates.

Use viewer.collaboration.enable(...) or viewer.collaboration.disable(...) to configure this state. The roomId parameter is optional (if omitted, a default room is resolved for the current document):

typescript
// Enable collaboration sync (resolves default room automatically)
viewer.collaboration.enable();

// Disable collaboration sync
viewer.collaboration.disable();
Enabling Collaboration

Implementation Notes

Enabling collaboration should typically happen after the viewer is mounted, Canvas is ready, and after user details have been configured via setUser(...).

When disabled, Canvas stops sending its own updates and ignores incoming synchronization messages from other participants.