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

Henry Castro hcastro at collabora.com
Sun May 20 15:52:39 UTC 2018


 loleaflet/src/control/Control.ContextMenu.js |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 6e6b56ad1bab68f1beeae97afe40a8667f92d324
Author: Henry Castro <hcastro at collabora.com>
Date:   Sun May 20 11:51:16 2018 -0400

    loleaflet: avoid unnecessary "map" global variable in Control.ContextMenu.js
    
    Change-Id: I9c1a7b6f05537d68306bfb6c4275ca096a4c6c6b

diff --git a/loleaflet/src/control/Control.ContextMenu.js b/loleaflet/src/control/Control.ContextMenu.js
index f49e924e4..9a6e53280 100644
--- a/loleaflet/src/control/Control.ContextMenu.js
+++ b/loleaflet/src/control/Control.ContextMenu.js
@@ -2,7 +2,7 @@
 * Control.ContextMenu
 */
 
-/* global $ map _ _UNO */
+/* global $ _ _UNO */
 L.Control.ContextMenu = L.Control.extend({
 	options: {
 		SEPARATOR: '---------',
@@ -68,6 +68,7 @@ L.Control.ContextMenu = L.Control.extend({
 	},
 
 	_onContextMenu: function(obj) {
+		var map = this._map;
 		if (map._permission !== 'edit') {
 			return;
 		}
@@ -93,7 +94,7 @@ L.Control.ContextMenu = L.Control.extend({
 	},
 
 	_createContextMenuStructure: function(obj) {
-		var docType = map.getDocType();
+		var docType = this._map.getDocType();
 		var contextMenu = {};
 		var sepIdx = 1, itemName;
 		var isLastItemText = false;


More information about the Libreoffice-commits mailing list