X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/420a7289a0b08eee091f6650c2e83166df3fbe69..bd7c279604469e0ef22ed8148603befa469d9c2b:/app/assets/javascripts/index/contextmenu.js diff --git a/app/assets/javascripts/index/contextmenu.js b/app/assets/javascripts/index/contextmenu.js index 080a4de72..fdde8dec4 100644 --- a/app/assets/javascripts/index/contextmenu.js +++ b/app/assets/javascripts/index/contextmenu.js @@ -1,4 +1,8 @@ +//= require querystring + OSM.initializeContextMenu = function (map) { + var querystring = require("querystring-component"); + map.contextmenu.addItem({ text: I18n.t("javascripts.context.directions_from"), callback: function directionsFromHere(e) { @@ -77,7 +81,7 @@ OSM.initializeContextMenu = function (map) { else map.contextmenu.enable(); }); - var updateMenu = function updateMenu () { + var updateMenu = function updateMenu() { map.contextmenu.setDisabled(2, map.getZoom() < 12); map.contextmenu.setDisabled(4, map.getZoom() < 14); };