X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7904b49bb13c23b8c8beb4f5bcf25fa12d8374dd..98b1e5f76ce400af3270c3350804d40e30fd7d53:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 2bda933a9..38c498169 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -109,8 +109,13 @@ $(document).ready(function () { control.addTo(map); }); - var lastContainer = controls[controls.length -1].getContainer(); - $(lastContainer).addClass("leaflet-control-group-end"); + var firstContainer = controls[0].getContainer(); + $(firstContainer).find(".control-button").first() + .addClass("control-button-first"); + + var lastContainer = controls[controls.length - 1].getContainer(); + $(lastContainer).find(".control-button").last() + .addClass("control-button-last"); } addControlGroup([ @@ -240,8 +245,8 @@ $(document).ready(function () { }); function remoteEditHandler(bbox, object) { - var loaded = false, - url, + var remoteEditHost = "http://127.0.0.1:8111", + osmHost = location.protocol + "//" + location.host, query = { left: bbox.getWest() - 0.0001, top: bbox.getNorth() + 0.0001, @@ -249,25 +254,31 @@ $(document).ready(function () { bottom: bbox.getSouth() - 0.0001 }; - url = "http://127.0.0.1:8111/load_and_zoom?"; - - if (object) query.select = object.type + object.id; - - var iframe = $("