fix: full width for select-location page + restore space fly animation
All checks were successful
Build Docker Image / build (push) Successful in 4m1s
All checks were successful
Build Docker Image / build (push) Successful in 4m1s
- Remove max-w-4xl constraint on /select-location page - Replace simple easeTo with flyThroughSpace in CatalogMap (2-phase animation: zoom out to space, then fly to target) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -42,6 +42,7 @@ const emit = defineEmits<{
|
||||
}>()
|
||||
|
||||
const mapRef = useMapboxRef(props.mapId)
|
||||
const { flyThroughSpace } = useMapboxFlyAnimation()
|
||||
|
||||
const mapOptions = computed(() => ({
|
||||
style: 'mapbox://styles/mapbox/satellite-streets-v12',
|
||||
@@ -177,14 +178,14 @@ watch(geoJsonData, (newData) => {
|
||||
}
|
||||
}, { deep: true })
|
||||
|
||||
// Expose flyTo method for external use
|
||||
const flyTo = (lat: number, lng: number, zoom = 8) => {
|
||||
// Expose flyTo method for external use (with space fly animation)
|
||||
const flyTo = async (lat: number, lng: number, zoom = 8) => {
|
||||
if (!mapRef.value) return
|
||||
mapRef.value.easeTo({
|
||||
center: [lng, lat],
|
||||
zoom,
|
||||
duration: 2000,
|
||||
easing: (t) => t * (2 - t)
|
||||
await flyThroughSpace(mapRef.value, {
|
||||
targetCenter: [lng, lat],
|
||||
targetZoom: zoom,
|
||||
totalDuration: 5000,
|
||||
minZoom: 3
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user