fix(refboard): broadcast scene changes to other clients immediately
onCanvasChange now calls broadcastSceneNow() so rearrangement, alignment, and other bulk operations sync to other tabs in real-time instead of waiting for the next periodic sync or page reload.
This commit is contained in:
@@ -105,6 +105,8 @@ export default function Editor({ isPublicView }: EditorProps) {
|
||||
// Canvas change handler
|
||||
const onCanvasChange = useCallback(() => {
|
||||
scheduleSave();
|
||||
// Broadcast changes to other connected clients immediately
|
||||
syncRef.current?.broadcastSceneNow();
|
||||
if (undoRef.current && !undoRef.current.isLocked()) {
|
||||
undoRef.current.saveState();
|
||||
setCanUndo(undoRef.current.canUndo());
|
||||
|
||||
Reference in New Issue
Block a user