Merge branch 'develop' into rav/roomview_works

This commit is contained in:
Richard van der Hoff 2016-02-15 12:19:53 +00:00
commit 601a7ce9fd

View file

@ -30,6 +30,7 @@ class UserActivity {
* Start listening to user activity * Start listening to user activity
*/ */
start() { start() {
document.onmousedown = this._onUserActivity.bind(this);
document.onmousemove = this._onUserActivity.bind(this); document.onmousemove = this._onUserActivity.bind(this);
document.onkeypress = this._onUserActivity.bind(this); document.onkeypress = this._onUserActivity.bind(this);
// can't use document.scroll here because that's only the document // can't use document.scroll here because that's only the document
@ -46,6 +47,7 @@ class UserActivity {
* Stop tracking user activity * Stop tracking user activity
*/ */
stop() { stop() {
document.onmousedown = undefined;
document.onmousemove = undefined; document.onmousemove = undefined;
document.onkeypress = undefined; document.onkeypress = undefined;
window.removeEventListener('wheel', this._onUserActivity.bind(this), true); window.removeEventListener('wheel', this._onUserActivity.bind(this), true);