loleaflet/src/map/Map.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
New commits: commit 1fa03a7c981ce45ea1469925c62fda5813fe2388 Author: Pranav Kant <pran...@collabora.co.uk> Date: Thu Dec 15 14:09:46 2016 +0530 Lets avoid using global variable, map for consistency Change-Id: I81157ea54ace6ff04d0730244f4ff8fdb893a3c3 diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 71d2ee3..aebefe0 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -767,12 +767,12 @@ L.Map = L.Evented.extend({ _dim: function() { // console.log('_dim:'); - if (!map._socket.connected()) { + if (!this._socket.connected()) { return; } // console.log(' cont'); - map._active = false; + this._active = false; clearTimeout(vex.timer); var options = $.extend({}, vex.defaultOptions, { @@ -792,6 +792,7 @@ L.Map = L.Evented.extend({ vex: options }); + var map = this; options.$vex.bind('click.vex', function(e) { // console.log('click.vex function'); return map._activate(); @@ -806,17 +807,17 @@ L.Map = L.Evented.extend({ $(options.appendLocation).append(options.$vex); vex.setupBodyClassName(options.$vex); - map._doclayer && map._docLayer._onMessage('textselection:', null); + this._doclayer && this._docLayer._onMessage('textselection:', null); // console.log(' sending userinactive'); - map._socket.sendMessage('userinactive'); + this._socket.sendMessage('userinactive'); }, _dimIfInactive: function () { // console.log('_dimIfInactive: diff=' + (Date.now() - map.lastActiveTime)); - if ((Date.now() - map.lastActiveTime) >= 10 * 60 * 1000) { // Dim 10 minutes after last user activity - map._dim(); + if ((Date.now() - this.lastActiveTime) >= 1 * 60 * 1000) { // Dim 10 minutes after last user activity + this._dim(); } else { - map._startInactiveTimer(); + this._startInactiveTimer(); } }, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits