fix(catalog): hide clusters when InfoPanel is open, show only related points
All checks were successful
Build Docker Image / build (push) Successful in 3m51s
All checks were successful
Build Docker Image / build (push) Successful in 3m51s
This commit is contained in:
@@ -16,9 +16,9 @@
|
||||
<CatalogMap
|
||||
ref="mapRef"
|
||||
:map-id="mapId"
|
||||
:items="useServerClustering ? [] : itemsWithCoords"
|
||||
:clustered-points="useServerClustering ? clusteredNodes : []"
|
||||
:use-server-clustering="useServerClustering"
|
||||
:items="isInfoMode ? [] : (useServerClustering ? [] : itemsWithCoords)"
|
||||
:clustered-points="isInfoMode ? [] : (useServerClustering ? clusteredNodes : [])"
|
||||
:use-server-clustering="useServerClustering && !isInfoMode"
|
||||
:point-color="activePointColor"
|
||||
:entity-type="activeEntityType"
|
||||
:hovered-item-id="hoveredId"
|
||||
@@ -299,6 +299,9 @@ const selectedMapItem = ref<MapItem | null>(null)
|
||||
// Mobile panel state
|
||||
const mobilePanelExpanded = ref(false)
|
||||
|
||||
// Info mode - when relatedPoints are present, hide clusters and show only related points
|
||||
const isInfoMode = computed(() => props.relatedPoints && props.relatedPoints.length > 0)
|
||||
|
||||
// Hovered item with coordinates for map highlight
|
||||
const hoveredItem = computed(() => {
|
||||
if (!props.hoveredId) return null
|
||||
@@ -326,7 +329,8 @@ const itemsWithCoords = computed(() =>
|
||||
const onBoundsChange = (bounds: MapBounds) => {
|
||||
currentBounds.value = bounds
|
||||
emit('bounds-change', bounds)
|
||||
if (props.useServerClustering) {
|
||||
// Don't fetch clusters when in info mode
|
||||
if (props.useServerClustering && !isInfoMode.value) {
|
||||
fetchClusters(bounds)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user