Browse Source

Fixed idle mousemove

master
Igor Zhukov 10 years ago
parent
commit
13b9d3efb0
  1. 4
      app/js/lib/ng_utils.js

4
app/js/lib/ng_utils.js

@ -823,6 +823,10 @@ angular.module('izhukov.utils', [])
function onEvent (e) { function onEvent (e) {
// console.log('event', e.type); // console.log('event', e.type);
if (e.type == 'mousemove') { if (e.type == 'mousemove') {
var e = e.originalEvent || e;
if (e && e.movementX === 0 && e.movementY === 0) {
return;
}
$($window).off('mousemove', onEvent); $($window).off('mousemove', onEvent);
} }
var isIDLE = e.type == 'blur' || e.type == 'timeout' ? true : false; var isIDLE = e.type == 'blur' || e.type == 'timeout' ? true : false;

Loading…
Cancel
Save