Fixed cursor animation might not correct because the page scroll involved

This commit is contained in:
Wu Cheng-Han 2015-12-18 09:43:23 -06:00
parent 031c96c72d
commit 3d21e6b16d

View file

@ -18,6 +18,7 @@ var defaultExtraKeys = {
var idleTime = 300000; //5 mins var idleTime = 300000; //5 mins
var updateViewDebounce = 200; var updateViewDebounce = 200;
var cursorActivityDebounce = 50; 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 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 = [ var supportHeaders = [
{ {
@ -1666,9 +1667,6 @@ function buildCursor(user) {
cursortag.find('i').removeClass().addClass('fa').addClass(iconClass); cursortag.find('i').removeClass().addClass('fa').addClass(iconClass);
cursortag.find(".name").text(user.name); 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') { if (cursor.css('display') === 'none') {
cursor[0].style.left = coord.left + 'px'; cursor[0].style.left = coord.left + 'px';
cursor[0].style.top = coord.top + 'px'; cursor[0].style.top = coord.top + 'px';
@ -1681,7 +1679,6 @@ function buildCursor(user) {
queue: false queue: false
}); });
} }
*/
if (user.idle && cursor.css('display') !== 'none') if (user.idle && cursor.css('display') !== 'none')
cursor.stop(true).fadeOut(); cursor.stop(true).fadeOut();