From 7f6c93bdceaaa958c933dd984ee9ae39e88d0b71 Mon Sep 17 00:00:00 2001 From: hjlarry Date: Tue, 13 Jan 2026 22:08:07 +0800 Subject: [PATCH] reduce CURSOR_THROTTLE_MS --- .../workflow/collaboration/services/cursor-service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 }