feat(refboard): incremental sync — stop full-scene broadcast on edits
Replace broadcastSceneNow() with incremental element:update for all property-modifying operations (align, arrange, flip, resize, rotate, normalize, frame color). Full scene sync now only fires via debounced fallback (500ms) for structural changes (add/remove/paste/group). Changes: - onCanvasChange() accepts optional changedIds for incremental sync - SelectionToolbar, context menu, shortcuts all pass item IDs - TransformBox.onDragEnd passes item IDs instead of full scene - ShortcutContext, MenuContext, hook interfaces updated This dramatically reduces sync traffic during normal editing — only the changed elements are sent instead of the entire board state.
This commit is contained in:
@@ -31,7 +31,7 @@ export interface ShortcutContext {
|
||||
selection: SelectionManager;
|
||||
history: UndoManager;
|
||||
viewport: Viewport;
|
||||
onChange: () => void;
|
||||
onChange: (changedIds?: string[]) => void;
|
||||
clipboardRef: React.MutableRefObject<SceneItem[]>;
|
||||
showToast: (msg: string) => void;
|
||||
fitAll: () => void;
|
||||
|
||||
Reference in New Issue
Block a user