Fix map clustering for all grid modes
All checks were successful
Build Docker Image / build (push) Successful in 3m29s
All checks were successful
Build Docker Image / build (push) Successful in 3m29s
This commit is contained in:
@@ -140,12 +140,20 @@ const cardType = computed(() => {
|
||||
|
||||
const showMap = computed(() => displayMode.value !== 'hero')
|
||||
|
||||
// Use server clustering for grids that need it
|
||||
const useServerClustering = computed(() => {
|
||||
return displayMode.value === 'grid-hubs' || displayMode.value === 'grid-offers'
|
||||
// Products grid - show offers clusters
|
||||
// Hubs grid - show hubs clusters
|
||||
// Offers grid - show offer clusters
|
||||
return ['grid-products', 'grid-hubs', 'grid-offers', 'grid-products-from-supplier', 'grid-products-in-hub'].includes(displayMode.value)
|
||||
})
|
||||
|
||||
const clusterNodeType = computed(() => {
|
||||
if (displayMode.value === 'grid-offers') return 'offer'
|
||||
// For products/offers show offer locations
|
||||
if (['grid-products', 'grid-offers', 'grid-products-from-supplier', 'grid-products-in-hub'].includes(displayMode.value)) {
|
||||
return 'offer'
|
||||
}
|
||||
// For hubs show logistics nodes
|
||||
return 'logistics'
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user