Commit f53a1484 authored by Rodrigo Tapia-McClung's avatar Rodrigo Tapia-McClung

Fix reset button drawing flows twice if nothing clicked

parent a0a93a97
......@@ -1106,7 +1106,14 @@ const makeBaseMap = () => {
$("#resetFlows").on("click", () => {
layers.forEach( layer => {
if (map.hasLayer(layer)) {
layer.selectFeaturesForPathDisplay(layer.originAndDestinationGeoJsonPoints.features, "SELECTION_NEW");
layer.originAndDestinationGeoJsonPoints.features.forEach(function(feature) {
if (feature.properties.isOrigin === true) {
feature.properties._isSelectedForPathDisplay = true;
} else {
feature.properties._isSelectedForPathDisplay = false;
}
});
layer._resetCanvas();
$("#tblViajesDesde tbody").html("");
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment