X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/77b4ff6ceb81a326b7ed3c80cf5d65ec2a2b18d5..9cc9a0098840363b6497337951b53aa583f4aa44:/app/assets/javascripts/index/history.js?ds=inline diff --git a/app/assets/javascripts/index/history.js b/app/assets/javascripts/index/history.js index db342cc24..8103f047e 100644 --- a/app/assets/javascripts/index/history.js +++ b/app/assets/javascripts/index/history.js @@ -46,7 +46,7 @@ OSM.History = function(map) { $("#changeset_" + id).find("a.changeset_id").simulate("click", e); } - function loadData() { + function update() { var data = {list: '1'}; if (window.location.pathname === '/history') { @@ -62,6 +62,11 @@ OSM.History = function(map) { updateMap(); } }); + + var feedLink = $('link[type="application/atom+xml"]'), + feedHref = feedLink.attr('href').split('?')[0]; + + feedLink.attr('href', feedHref + '?bbox=' + data.bbox); } function loadMore(e) { @@ -121,18 +126,15 @@ OSM.History = function(map) { map.addLayer(group); if (window.location.pathname === '/history') { - map.on("moveend", loadData) + map.on("moveend", update); } - loadData(); + update(); }; page.unload = function() { map.removeLayer(group); - - if (window.location.pathname === '/history') { - map.off("moveend", loadData) - } + map.off("moveend", update); $("#history_tab").removeClass("current"); };