summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Cheng-Han2015-12-18 09:43:23 -0600
committerWu Cheng-Han2015-12-18 09:43:23 -0600
commit3d21e6b16dd8ddbed0159b0cff7888190f808423 (patch)
tree8d1130c9cd3e280b30e71ea9cec6d7e02398bc57
parent031c96c72d168a23cca0c609f46e019eced8bc64 (diff)
Fixed cursor animation might not correct because the page scroll involved
Diffstat (limited to '')
-rw-r--r--public/js/index.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 88410749..d3c02b12 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -18,6 +18,7 @@ var defaultExtraKeys = {
var idleTime = 300000; //5 mins
var updateViewDebounce = 200;
var cursorActivityDebounce = 50;
+var cursorAnimatePeriod = 100;
var supportCodeModes = ['javascript', 'htmlmixed', 'htmlembedded', 'css', 'xml', 'clike', 'clojure', 'ruby', 'python', 'shell', 'php', 'sql', 'coffeescript', 'yaml', 'jade', 'lua', 'cmake', 'nginx', 'perl', 'sass', 'r', 'dockerfile'];
var supportHeaders = [
{
@@ -1665,10 +1666,7 @@ function buildCursor(user) {
var cursortag = cursor.find('.cursortag');
cursortag.find('i').removeClass().addClass('fa').addClass(iconClass);
cursortag.find(".name").text(user.name);
-
- cursor[0].style.left = coord.left + 'px';
- cursor[0].style.top = coord.top + 'px';
- /*
+
if (cursor.css('display') === 'none') {
cursor[0].style.left = coord.left + 'px';
cursor[0].style.top = coord.top + 'px';
@@ -1681,7 +1679,6 @@ function buildCursor(user) {
queue: false
});
}
- */
if (user.idle && cursor.css('display') !== 'none')
cursor.stop(true).fadeOut();