Fix camera jumping when opening InfoPanel
All checks were successful
Build Docker Image / build (push) Successful in 4m17s
All checks were successful
Build Docker Image / build (push) Successful in 4m17s
Replace setTimeout/debounce with event-based approach: - Add isInfoLoading computed that tracks all info loading states - Pass infoLoading prop through CatalogPage to CatalogMap - Watch infoLoading transition from true->false to trigger fitBounds - Remove setTimeout hack in favor of proper loading state detection
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
:show-panel="showPanel"
|
||||
:filter-by-bounds="filterByBounds"
|
||||
:related-points="relatedPoints"
|
||||
:info-loading="isInfoLoading"
|
||||
@select="onMapSelect"
|
||||
@bounds-change="onBoundsChange"
|
||||
@update:filter-by-bounds="$event ? setBoundsInUrl(currentMapBounds) : clearBoundsFromUrl()"
|
||||
@@ -356,6 +357,11 @@ watch(searchTrigger, () => {
|
||||
// Loading state
|
||||
const isLoading = computed(() => offersLoading.value || selectionLoading.value)
|
||||
|
||||
// Info loading state for map fitBounds (true while any info data is still loading)
|
||||
const isInfoLoading = computed(() =>
|
||||
infoLoading.value || isLoadingProducts.value || isLoadingHubs.value || isLoadingSuppliers.value || isLoadingOffers.value
|
||||
)
|
||||
|
||||
// Show panel when selecting OR when showing info OR when showing quote results
|
||||
const showPanel = computed(() => {
|
||||
return selectMode.value !== null || infoId.value !== null || showQuoteResults.value
|
||||
|
||||
Reference in New Issue
Block a user