X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/15d148dbd4cb7497f7faae06e58d4227c530cd8a..ff52509d5a75c7f218a8d6d6d82bb25897b3dae9:/app/assets/javascripts/index/map_ui.js?ds=sidebyside diff --git a/app/assets/javascripts/index/map_ui.js b/app/assets/javascripts/index/map_ui.js index 1360c7024..6d98f6642 100644 --- a/app/assets/javascripts/index/map_ui.js +++ b/app/assets/javascripts/index/map_ui.js @@ -15,6 +15,10 @@ OSM.MapUI = L.Control.extend({ link.title = 'Layers'; this._uiPane = L.DomUtil.create('div', 'leaflet-map-ui', map._container); + L.DomEvent + .on(this._uiPane, 'click', L.DomEvent.stopPropagation) + .on(this._uiPane, 'click', L.DomEvent.preventDefault) + .on(this._uiPane, 'dblclick', L.DomEvent.preventDefault); $(link).on('click', $.proxy(this.toggleLayers, this)); }, @@ -27,12 +31,12 @@ OSM.MapUI = L.Control.extend({ if ($(this._uiPane).is(':visible')) { $(this._uiPane).hide(); - controlContainer.css({paddingRight: '0'}) + controlContainer.css({paddingRight: '0'}); } else { $(this._uiPane) .show() .html(JST["templates/map/layers"]()); - controlContainer.css({paddingRight: '200px'}) + controlContainer.css({paddingRight: '200px'}); } } });