X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6acb032d4c5ab6e891a773d4a89dfc53725f9d86..a9b616af123d52a82b8f65915164e11ab8d71ba8:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 6f3bb0c50..783c4da8d 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -111,12 +111,11 @@ $(document).ready(function () { var firstContainer = controls[0].getContainer(); $(firstContainer).find(".control-button").first() - .css("border-start-start-radius", "4px"); + .addClass("control-button-first"); var lastContainer = controls[controls.length - 1].getContainer(); $(lastContainer).find(".control-button").last() - .css("margin-bottom", "10px") - .css("border-end-start-radius", "4px"); + .addClass("control-button-last"); } addControlGroup([ @@ -193,11 +192,11 @@ $(document).ready(function () { }); if (Cookies.get("_osm_welcome") !== "hide") { - $(".welcome").addClass("visible"); + $(".welcome").removeAttr("hidden"); } $(".welcome .btn-close").on("click", function () { - $(".welcome").removeClass("visible"); + $(".welcome").hide(); Cookies.set("_osm_welcome", "hide", { secure: true, expires: expiry, path: "/", samesite: "lax" }); }); @@ -246,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, @@ -255,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 = $("