-//= require jquery.simulate
+//= require jquery-simulate/jquery.simulate
OSM.History = function (map) {
var page = {};
})
.on("mouseout", "[data-changeset]", function () {
unHighlightChangeset($(this).data("changeset").id);
- })
- .on("mousedown", "[data-changeset]", function () {
- var moved = false;
- $(this)
- .one("click", function (e) {
- if (!moved && !$(e.target).is("a")) {
- clickChangeset($(this).data("changeset").id, e);
- }
- })
- .one("mousemove", function () {
- moved = true;
- });
});
var group = L.featureGroup()
function highlightChangeset(id) {
var layer = group.getLayer(id);
- if ( layer ) layer.setStyle({ fillOpacity: 0.3, color: "#FF6600", weight: 3 });
+ if (layer) layer.setStyle({ fillOpacity: 0.3, color: "#FF6600", weight: 3 });
$("#changeset_" + id).addClass("selected");
}
function unHighlightChangeset(id) {
var layer = group.getLayer(id);
- if ( layer ) layer.setStyle({ fillOpacity: 0, color: "#FF9500", weight: 2 });
+ if (layer) layer.setStyle({ fillOpacity: 0, color: "#FF9500", weight: 2 });
$("#changeset_" + id).removeClass("selected");
}
if (window.location.pathname === "/history") {
data.bbox = map.getBounds().wrap().toBBoxString();
+ var feedLink = $("link[type=\"application/atom+xml\"]"),
+ feedHref = feedLink.attr("href").split("?")[0];
+ feedLink.attr("href", feedHref + "?bbox=" + data.bbox);
}
$.ajax({
updateMap();
}
});
-
- var feedLink = $("link[type=\"application/atom+xml\"]"),
- feedHref = feedLink.attr("href").split("?")[0];
-
- feedLink.attr("href", feedHref + "?bbox=" + data.bbox);
}
function loadMore(e) {