Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

ensure group count is correct based on projection

Jason Kent9da3b90e456f
diff --git a/web/js/containers/sidebar/layer-list.js b/web/js/containers/sidebar/layer-list.js
index 53291a236..5ae74be89 100644
--- a/web/js/containers/sidebar/layer-list.js
+++ b/web/js/containers/sidebar/layer-list.js
@@ -51,6 +51,7 @@ function LayerList(props) {
isMobile,
} = props;
const groupLayerIds = layers.map(({ id }) => id);
+ const layersInProj = layers.filter(({ projections }) => projections[projId]);
const [showDropdownBtn, setDropdownBtnVisible] = useState(false);
const [showDropdownMenu, setDropdownMenuVisible] = useState(false);
const [runningDataObj, setRunningDataObj] = useState({});
@@ -157,7 +158,7 @@ function LayerList(props) {
>
<h3 className="layer-group-title">
{title}
- {collapsed ? ` (${layers.length})` : ''}
+ {collapsed ? ` (${layersInProj.length})` : ''}
</h3>
<div className="layer-group-icons">
{showDropdownBtn || isMobile ? renderDropdownMenu() : null}