瀏覽代碼

rename MAX_CURSOR_UPDATES_INTERVAL_MS to MIN_CURSOR_UPDATES_INTERVAL_MS since it is the minimum interval, not the maximum (#113)

dev_h
David Roundy 5 年之前
父節點
當前提交
245e8fbffe
No account linked to committer's email address
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      client-data/tools/cursor/cursor.js

+ 2
- 2
client-data/tools/cursor/cursor.js 查看文件

@@ -27,7 +27,7 @@
27 27
 (function () { // Code isolation
28 28
 
29 29
     // Allocate half of the maximum server updates to cursor updates
30
-    var MAX_CURSOR_UPDATES_INTERVAL_MS = Tools.server_config.MAX_EMIT_COUNT_PERIOD / Tools.server_config.MAX_EMIT_COUNT * 2;
30
+    var MIN_CURSOR_UPDATES_INTERVAL_MS = Tools.server_config.MAX_EMIT_COUNT_PERIOD / Tools.server_config.MAX_EMIT_COUNT * 2;
31 31
 
32 32
     var CURSOR_DELETE_AFTER_MS = 1000 * 5;
33 33
 
@@ -74,7 +74,7 @@
74 74
     function updateMarker() {
75 75
         if (!Tools.showMarker || !Tools.showMyCursor) return;
76 76
         var cur_time = Date.now();
77
-        if (cur_time - lastCursorUpdate > MAX_CURSOR_UPDATES_INTERVAL_MS &&
77
+        if (cur_time - lastCursorUpdate > MIN_CURSOR_UPDATES_INTERVAL_MS &&
78 78
             (sending || Tools.curTool.showMarker)) {
79 79
             Tools.drawAndSend(message, cursorTool);
80 80
             lastCursorUpdate = cur_time;

Loading…
取消
儲存