diff --git a/web/app/components/workflow/collaboration/services/cursor-service.ts b/web/app/components/workflow/collaboration/services/cursor-service.ts index 3fa976a90d..73e1c6cbd1 100644 --- a/web/app/components/workflow/collaboration/services/cursor-service.ts +++ b/web/app/components/workflow/collaboration/services/cursor-service.ts @@ -3,7 +3,7 @@ import type { CursorPosition } from '../types/collaboration' import type { ReactFlowInstance } from 'reactflow' const CURSOR_MIN_MOVE_DISTANCE = 10 -const CURSOR_THROTTLE_MS = 500 +const CURSOR_THROTTLE_MS = 300 export class CursorService { private containerRef: RefObject | null = null @@ -71,8 +71,8 @@ export class CursorService { const timeThrottled = now - this.lastEmitTime > CURSOR_THROTTLE_MS const minDistance = CURSOR_MIN_MOVE_DISTANCE / (this.reactFlowInstance?.getZoom() || 1) const distanceThrottled = !this.lastPosition - || (Math.abs(x - this.lastPosition.x) > minDistance) - || (Math.abs(y - this.lastPosition.y) > minDistance) + || (Math.abs(x - this.lastPosition.x) > minDistance) + || (Math.abs(y - this.lastPosition.y) > minDistance) if (timeThrottled && distanceThrottled) { this.lastPosition = { x, y }