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

Henry Castro hcastro at collabora.com
Fri Jan 22 18:17:04 PST 2016


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

New commits:
commit 620fdaf3fb7f83c30cc3dac52a207e8e37cb9db8
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