X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/fec9dc84c05a496141d4e7fedd21765ddcceba06..e418075e26d80d68e4127d3358a2d8b11dee3a13:/app/assets/javascripts/leaflet.map.js.erb diff --git a/app/assets/javascripts/leaflet.map.js.erb b/app/assets/javascripts/leaflet.map.js.erb index dec544d33..f65325e37 100644 --- a/app/assets/javascripts/leaflet.map.js.erb +++ b/app/assets/javascripts/leaflet.map.js.erb @@ -178,10 +178,11 @@ L.OSM.Map = L.Map.extend({ }; var changesetStyle = { - weight: 1, + weight: 4, color: '#FF9500', opacity: 1, - fillOpacity: 0 + fillOpacity: 0, + clickable: false }; this._object = object; @@ -218,12 +219,13 @@ L.OSM.Map = L.Map.extend({ map._objectLayer.addData(xml); map._objectLayer.addTo(map); - var bounds = map._objectLayer.getBounds(); - if (bounds.isValid()) { - OSM.route.moveListenerOff(); - map.once('moveend', OSM.route.moveListenerOn); - - map.fitBounds(bounds); + if (!window.location.hash) { + var bounds = map._objectLayer.getBounds(); + if (bounds.isValid()) { + OSM.router.moveListenerOff(); + map.once('moveend', OSM.router.moveListenerOn); + map.fitBounds(bounds); + } } } });