Skip to content

Commit

Permalink
issue/hitide-ui-44: fixed footprint/preview staying on map
Browse files Browse the repository at this point in the history
  • Loading branch information
jbyrne committed Mar 7, 2024
1 parent 1e5d4aa commit 63ebb3f
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions src/jpl/dijit/GranulesController.js
Original file line number Diff line number Diff line change
Expand Up @@ -774,27 +774,28 @@ define([

x["source"] = "cmr";

// if Granule not in list of currently visible footprints and preview, remove that footprint/preview from display on the map
var granuleName = x["Granule-Name"]
if (granuleName) {
if (footprintKeys.length > 0) {
if (footprintKeys.includes(granuleName)) {
x.footprint = true
// remove object from list
delete currentlyVisibleFootprints[x["Granule-Name"]]
} else {
x.footprint = false
}
}
if (previewKeys.length > 0) {
if (previewKeys.includes(granuleName)) {
x.preview = true
delete currentlyVisiblePreviews[x["Granule-Name"]]
} else {
x.preview = false
}
}
}
// TODO
// // if Granule not in list of currently visible footprints and preview, remove that footprint/preview from display on the map
// var granuleName = x["Granule-Name"]
// if (granuleName) {
// if (footprintKeys.length > 0) {
// if (footprintKeys.includes(granuleName)) {
// x.footprint = true
// // remove object from list
// delete currentlyVisibleFootprints[x["Granule-Name"]]
// } else {
// x.footprint = false
// }
// }
// if (previewKeys.length > 0) {
// if (previewKeys.includes(granuleName)) {
// x.preview = true
// delete currentlyVisiblePreviews[x["Granule-Name"]]
// } else {
// x.preview = false
// }
// }
// }

_context.gridStore.add(x)
});
Expand Down

0 comments on commit 63ebb3f

Please sign in to comment.