From ad49283341a57b0ed341d363c1b2ab2c6bdbe63d Mon Sep 17 00:00:00 2001 From: PatchesMaps Date: Wed, 6 Nov 2024 10:18:51 -0500 Subject: [PATCH] Remove requirement for currently selected time to be not in a DAR for no-imagery granules to be shown --- web/js/map/granule/granule-layer-builder.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/js/map/granule/granule-layer-builder.js b/web/js/map/granule/granule-layer-builder.js index 5eeafc47c2..469076b67c 100644 --- a/web/js/map/granule/granule-layer-builder.js +++ b/web/js/map/granule/granule-layer-builder.js @@ -204,11 +204,11 @@ export default function granuleLayerBuilder(cache, store, createLayerWMTS) { const granuleIsWithinRange = isWithinRanges(dateDate, granuleDateRanges) ?? true; // check if the current granule is within a date range, defaults to true const gaps = identifyGaps(granuleDateRanges); // identify gaps between date ranges const currentlySelectedGap = !isWithinRange ? gaps.find(([start, end]) => leadingEdgeDate >= start && leadingEdgeDate <= end) : null; // get the gap that the currently selected time is within - const granuleIsWithinSelectedGap = currentlySelectedGap ? dateDate >= currentlySelectedGap[0] && dateDate <= currentlySelectedGap[1] : false; // check if the current granule is within the currently selected gap + const granuleIsWithinSelectedGap = currentlySelectedGap ? dateDate >= currentlySelectedGap[0] && dateDate <= currentlySelectedGap[1] : true; // check if the current granule is within the currently selected gap if (dateDate <= leadingEdgeDate && isWithinRange && granuleIsWithinRange && isWithinBounds(crs, item)) { visibleGranules.unshift(item); - } else if (dateDate <= leadingEdgeDate && !isWithinRange && !granuleIsWithinRange && isWithinBounds(crs, item) && granuleIsWithinSelectedGap) { + } else if (dateDate <= leadingEdgeDate && !granuleIsWithinRange && isWithinBounds(crs, item) && granuleIsWithinSelectedGap) { invisibleGranules.unshift(item); }