|
|
|
|
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;
|