[TASK] Context menu/right click open layermenu

This commit is contained in:
Xaver Maierhofer 2016-05-22 16:36:14 +02:00
parent 5e93a5da68
commit b27ae7e8da
1 changed files with 3 additions and 3 deletions

View File

@ -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);