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
|
<CatalogMap
|
||||||
ref="mapRef"
|
ref="mapRef"
|
||||||
:map-id="mapId"
|
:map-id="mapId"
|
||||||
:items="useServerClustering ? [] : itemsWithCoords"
|
:items="isInfoMode ? [] : (useServerClustering ? [] : itemsWithCoords)"
|
||||||
:clustered-points="useServerClustering ? clusteredNodes : []"
|
:clustered-points="isInfoMode ? [] : (useServerClustering ? clusteredNodes : [])"
|
||||||
:use-server-clustering="useServerClustering"
|
:use-server-clustering="useServerClustering && !isInfoMode"
|
||||||
:point-color="activePointColor"
|
:point-color="activePointColor"
|
||||||
:entity-type="activeEntityType"
|
:entity-type="activeEntityType"
|
||||||
:hovered-item-id="hoveredId"
|
:hovered-item-id="hoveredId"
|
||||||
@@ -299,6 +299,9 @@ const selectedMapItem = ref<MapItem | null>(null)
|
|||||||
// Mobile panel state
|
// Mobile panel state
|
||||||
const mobilePanelExpanded = ref(false)
|
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
|
// Hovered item with coordinates for map highlight
|
||||||
const hoveredItem = computed(() => {
|
const hoveredItem = computed(() => {
|
||||||
if (!props.hoveredId) return null
|
if (!props.hoveredId) return null
|
||||||
@@ -326,7 +329,8 @@ const itemsWithCoords = computed(() =>
|
|||||||
const onBoundsChange = (bounds: MapBounds) => {
|
const onBoundsChange = (bounds: MapBounds) => {
|
||||||
currentBounds.value = bounds
|
currentBounds.value = bounds
|
||||||
emit('bounds-change', bounds)
|
emit('bounds-change', bounds)
|
||||||
if (props.useServerClustering) {
|
// Don't fetch clusters when in info mode
|
||||||
|
if (props.useServerClustering && !isInfoMode.value) {
|
||||||
fetchClusters(bounds)
|
fetchClusters(bounds)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user