File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -20,3 +20,7 @@ export const HIDDEN_UI_ELEMENTS = {
2020 sidebar : true ,
2121} ;
2222
23+ // Collab constants
24+ export const POINTER_MOVE_THROTTLE_MS = 30 ; // Throttle pointer move events to reduce the number of updates sent to the server
25+ export const ENABLE_PERIODIC_FULL_SYNC = false ; // Set to false to disable periodic scene_update full sync
26+ export const PERIODIC_FULL_SYNC_INTERVAL_MS = 60000 ; // Sync scene_update every 60 seconds if ENABLE_PERIODIC_FULL_SYNC is true
Original file line number Diff line number Diff line change 55 viewportCoordsToSceneCoords ,
66 getSceneVersion ,
77 reconcileElements ,
8- restoreElements ,
9- getVisibleSceneBounds ,
10- zoomToFitBounds
8+ restoreElements
119} from '@atyrode/excalidraw' ;
1210import throttle from 'lodash.throttle' ;
1311import isEqual from 'lodash.isequal' ;
@@ -16,6 +14,7 @@ import Portal from './Portal';
1614import type { WebSocketMessage , ConnectionStatus } from './Portal' ;
1715import type { UserInfo } from '../../hooks/useAuthStatus' ;
1816import { debounce , type DebouncedFunction } from '../debounce' ;
17+ import { POINTER_MOVE_THROTTLE_MS , ENABLE_PERIODIC_FULL_SYNC , PERIODIC_FULL_SYNC_INTERVAL_MS } from '../../constants' ;
1918
2019interface PointerData {
2120 x : number ;
@@ -61,12 +60,6 @@ interface CollabState {
6160 lastProcessedSceneVersion : number ;
6261}
6362
64- const POINTER_MOVE_THROTTLE_MS = 20 ;
65-
66- // Constants for periodic full scene sync
67- const ENABLE_PERIODIC_FULL_SYNC = false ; // Set to false to disable periodic full sync
68- const PERIODIC_FULL_SYNC_INTERVAL_MS = 60000 ; // Sync every 60 seconds (adjust as needed)
69-
7063class Collab extends PureComponent < CollabProps , CollabState > {
7164 [ x : string ] : any ;
7265 readonly state : CollabState ;
You can’t perform that action at this time.
0 commit comments