From b27ae7e8da09dcc1a52b14235fba620580536522 Mon Sep 17 00:00:00 2001 From: Xaver Maierhofer Date: Sun, 22 May 2016 16:36:14 +0200 Subject: [PATCH] [TASK] Context menu/right click open layermenu --- lib/map.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/map.js b/lib/map.js index 6835fa8..90b020f 100644 --- a/lib/map.js +++ b/lib/map.js @@ -285,8 +285,8 @@ define(["map/clientlayer", "map/labelslayer", } } - function contextMenuGotoLocation(e) { - router.gotoLocation(e.latlng); + function contextMenuOpenLayerMenu() { + document.querySelector('.leaflet-control-layers').classList.add('leaflet-control-layers-expanded'); } var el = document.createElement("div"); @@ -310,7 +310,7 @@ define(["map/clientlayer", "map/labelslayer", map.on("locationfound", locationFound); map.on("locationerror", locationError); map.on("dragend", saveView); - map.on("contextmenu", contextMenuGotoLocation); + map.on("contextmenu", contextMenuOpenLayerMenu); addButton(locateUserButton); addButton(showCoordsPickerButton);