Преглед изворни кода

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
 (function () { // Code isolation
27
 (function () { // Code isolation
28
 
28
 
29
     // Allocate half of the maximum server updates to cursor updates
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
     var CURSOR_DELETE_AFTER_MS = 1000 * 5;
32
     var CURSOR_DELETE_AFTER_MS = 1000 * 5;
33
 
33
 
74
     function updateMarker() {
74
     function updateMarker() {
75
         if (!Tools.showMarker || !Tools.showMyCursor) return;
75
         if (!Tools.showMarker || !Tools.showMyCursor) return;
76
         var cur_time = Date.now();
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
             (sending || Tools.curTool.showMarker)) {
78
             (sending || Tools.curTool.showMarker)) {
79
             Tools.drawAndSend(message, cursorTool);
79
             Tools.drawAndSend(message, cursorTool);
80
             lastCursorUpdate = cur_time;
80
             lastCursorUpdate = cur_time;

Loading…
Откажи
Сачувај