[Libreoffice-commits] online.git: Branch 'distro/collabora/milestone-7' - loleaflet/src

Henry Castro hcastro at collabora.com
Fri Jan 22 13:38:08 PST 2016


 loleaflet/src/map/handler/Map.Mouse.js |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit ef6ecc34dbdd5e3824a97ae8e92fdf09b5dd5a54
Author: Henry Castro <hcastro at collabora.com>
Date:   Fri Jan 22 17:36:48 2016 -0400

    loleaflet: update button modifier on mouse event

diff --git a/loleaflet/src/map/handler/Map.Mouse.js b/loleaflet/src/map/handler/Map.Mouse.js
index 07ddf8e..440298d 100644
--- a/loleaflet/src/map/handler/Map.Mouse.js
+++ b/loleaflet/src/map/handler/Map.Mouse.js
@@ -78,7 +78,13 @@ L.Map.Mouse = L.Handler.extend({
 			}
 		}
 
-		var modifier = this._map.keyboard.modifier;
+		var modifier = 0;
+		var shift = e.originalEvent.shiftKey ? this._map.keyboard.keyModifier.shift : 0;
+		var ctrl = e.originalEvent.ctrlKey ? this._map.keyboard.keyModifier.ctrl : 0;
+		var alt = e.originalEvent.altKey ? this._map.keyboard.keyModifier.alt : 0;
+		var cmd = e.originalEvent.metaKey ? this._map.keyboard.keyModifier.ctrlMac : 0;
+		modifier = shift | ctrl | alt | cmd;
+
 		var buttons = 0;
 		buttons |= e.originalEvent.button === this.JSButtons.left ? this.LOButtons.left : 0;
 		buttons |= e.originalEvent.button === this.JSButtons.middle ? this.LOButtons.middle : 0;


More information about the Libreoffice-commits mailing list