Fix map clusters: use Apollo client, remove flyTo on hover
All checks were successful
Build Docker Image / build (push) Successful in 4m48s
All checks were successful
Build Docker Image / build (push) Successful in 4m48s
This commit is contained in:
@@ -272,21 +272,6 @@ watch(() => props.selectedId, (uuid) => {
|
||||
}
|
||||
})
|
||||
|
||||
// Watch hoveredId and fly to it
|
||||
watch(() => props.hoveredId, (uuid) => {
|
||||
if (uuid && props.withMap) {
|
||||
// Try direct match first
|
||||
let item = itemsWithCoords.value.find(i => i.uuid === uuid)
|
||||
// If not found, try matching by orderUuid (for mapItems with separate source/dest points)
|
||||
if (!item) {
|
||||
item = itemsWithCoords.value.find(i => i.uuid === `${uuid}-source` || (i as any).orderUuid === uuid)
|
||||
}
|
||||
if (item) {
|
||||
mapRef.value?.flyTo(item.latitude, item.longitude, 8)
|
||||
mobileMapRef.value?.flyTo(item.latitude, item.longitude, 8)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// Expose flyTo for external use
|
||||
const flyTo = (lat: number, lng: number, zoom = 8) => {
|
||||
|
||||
Reference in New Issue
Block a user