X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/c162c065c6f6db5dc584599f5639b296b627a165..a78da07f0b771b9c65195e304cc8c8a31c9155df:/app/assets/javascripts/index/history.js diff --git a/app/assets/javascripts/index/history.js b/app/assets/javascripts/index/history.js index 80fb68444..7f0fdf848 100644 --- a/app/assets/javascripts/index/history.js +++ b/app/assets/javascripts/index/history.js @@ -1,4 +1,4 @@ -//= require jquery.simulate +//= require jquery-simulate/jquery.simulate OSM.History = function (map) { var page = {}; @@ -40,12 +40,14 @@ OSM.History = function (map) { }; function highlightChangeset(id) { - group.getLayer(id).setStyle({ fillOpacity: 0.3, color: "#FF6600", weight: 3 }); + var layer = group.getLayer(id); + if (layer) layer.setStyle({ fillOpacity: 0.3, color: "#FF6600", weight: 3 }); $("#changeset_" + id).addClass("selected"); } function unHighlightChangeset(id) { - group.getLayer(id).setStyle({ fillOpacity: 0, color: "#FF9500", weight: 2 }); + var layer = group.getLayer(id); + if (layer) layer.setStyle({ fillOpacity: 0, color: "#FF9500", weight: 2 }); $("#changeset_" + id).removeClass("selected"); }