[Libreoffice-commits] online.git: loleaflet/src

Henry Castro hcastro at collabora.com
Sun May 20 15:31:27 UTC 2018


 loleaflet/src/control/Control.LokDialog.js |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit ca87ac8bd5ff67c38ee08698db469dd6723520a0
Author: Henry Castro <hcastro at collabora.com>
Date:   Sun May 20 11:30:13 2018 -0400

    loleaflet: avoid unnecessary "map" global variable in LokDialog.js
    
    Change-Id: I9172bf0ab2aa5178524b7bb5106cc7bb4cdc243d

diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 48dacd53d..4dfb1ed4f 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -2,7 +2,7 @@
  * L.Control.LokDialog used for displaying LOK dialogs
  */
 
-/* global $ map L */
+/* global $ L */
 L.Control.LokDialog = L.Control.extend({
 
 	dialogIdPrefix: 'lokdialog-',
@@ -298,9 +298,9 @@ L.Control.LokDialog = L.Control.extend({
 		L.DomEvent.on(dialogCanvas, 'mousedown mouseup', function(e) {
 			L.DomEvent.stopPropagation(e);
 			var buttons = 0;
-			buttons |= e.button === map['mouse'].JSButtons.left ? map['mouse'].LOButtons.left : 0;
-			buttons |= e.button === map['mouse'].JSButtons.middle ? map['mouse'].LOButtons.middle : 0;
-			buttons |= e.button === map['mouse'].JSButtons.right ? map['mouse'].LOButtons.right : 0;
+			buttons |= e.button === this._map['mouse'].JSButtons.left ? this._map['mouse'].LOButtons.left : 0;
+			buttons |= e.button === this._map['mouse'].JSButtons.middle ? this._map['mouse'].LOButtons.middle : 0;
+			buttons |= e.button === this._map['mouse'].JSButtons.right ? this._map['mouse'].LOButtons.right : 0;
 			// 'mousedown' -> 'buttondown'
 			var lokEventType = e.type.replace('mouse', 'button');
 			this._postWindowMouseEvent(lokEventType, this._toRawDlgId(strDlgId), e.offsetX, e.offsetY, 1, buttons, 0);
@@ -310,7 +310,7 @@ L.Control.LokDialog = L.Control.extend({
 		              'keyup keypress keydown compositionstart compositionupdate compositionend textInput',
 		              function(e) {
 			              e.originalEvent = e; // _onKeyDown fn below requires real event in e.originalEvent
-			              map['keyboard']._onKeyDown(e,
+			              this._map['keyboard']._onKeyDown(e,
 			                                         L.bind(this._postWindowKeyboardEvent,
 			                                                this,
 			                                                this._toRawDlgId(strDlgId)),
@@ -445,9 +445,9 @@ L.Control.LokDialog = L.Control.extend({
 		// attach events
 		L.DomEvent.on(floatingCanvas, 'mousedown mouseup', function(e) {
 			var buttons = 0;
-			buttons |= e.button === map['mouse'].JSButtons.left ? map['mouse'].LOButtons.left : 0;
-			buttons |= e.button === map['mouse'].JSButtons.middle ? map['mouse'].LOButtons.middle : 0;
-			buttons |= e.button === map['mouse'].JSButtons.right ? map['mouse'].LOButtons.right : 0;
+			buttons |= e.button === this._map['mouse'].JSButtons.left ? this._map['mouse'].LOButtons.left : 0;
+			buttons |= e.button === this._map['mouse'].JSButtons.middle ? this._map['mouse'].LOButtons.middle : 0;
+			buttons |= e.button === this._map['mouse'].JSButtons.right ? this._map['mouse'].LOButtons.right : 0;
 			var lokEventType = e.type.replace('mouse', 'button');
 			this._postWindowMouseEvent(lokEventType, childId, e.offsetX, e.offsetY, 1, buttons, 0);
 		}, this);


More information about the Libreoffice-commits mailing list