X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/4a23ee8baf90c3729ad44ff75748670cfdebf6ad..c322b0c298ddbf11fdd2c7cf541cefde0f2b5e55:/app/views/site/index.html.erb diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb index 08bada0b9..5d78b2340 100644 --- a/app/views/site/index.html.erb +++ b/app/views/site/index.html.erb @@ -25,7 +25,7 @@
@@ -133,11 +133,6 @@ end var loginName = "<%= @user.display_name %>" <% end %> - function createBugCallBack() { - map.osbControl.deactivate(); - document.getElementById("OpenLayers.Map_18_OpenLayers_Container").style.cursor = "default"; - } - function mapInit(){ map = createMap("map"); @@ -168,6 +163,9 @@ end lBug.addEventListener('click',function (e) { map.osbControl.activate(); document.getElementById("OpenLayers.Map_18_OpenLayers_Container").style.cursor = "crosshair" },false); + map.events.register("zoomend",map,function () { var zoom = map.getZoom(); var lBug = document.getElementById('ReportBug') + if (zoom > 11) { lBug.style.visibility = 'visible';} else {lBug.style.visibility = "hidden";}}); + <% end %>