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 mapRef = useMapboxRef(props.mapId)
|
||||||
|
const { flyThroughSpace } = useMapboxFlyAnimation()
|
||||||
|
|
||||||
const mapOptions = computed(() => ({
|
const mapOptions = computed(() => ({
|
||||||
style: 'mapbox://styles/mapbox/satellite-streets-v12',
|
style: 'mapbox://styles/mapbox/satellite-streets-v12',
|
||||||
@@ -177,14 +178,14 @@ watch(geoJsonData, (newData) => {
|
|||||||
}
|
}
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
|
|
||||||
// Expose flyTo method for external use
|
// Expose flyTo method for external use (with space fly animation)
|
||||||
const flyTo = (lat: number, lng: number, zoom = 8) => {
|
const flyTo = async (lat: number, lng: number, zoom = 8) => {
|
||||||
if (!mapRef.value) return
|
if (!mapRef.value) return
|
||||||
mapRef.value.easeTo({
|
await flyThroughSpace(mapRef.value, {
|
||||||
center: [lng, lat],
|
targetCenter: [lng, lat],
|
||||||
zoom,
|
targetZoom: zoom,
|
||||||
duration: 2000,
|
totalDuration: 5000,
|
||||||
easing: (t) => t * (2 - t)
|
minZoom: 3
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container mx-auto px-4 py-8 max-w-4xl">
|
<div class="container mx-auto px-4 py-8">
|
||||||
<PageHeader :title="t('common.selectLocation')">
|
<PageHeader :title="t('common.selectLocation')">
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<button class="btn btn-ghost" @click="router.back()">
|
<button class="btn btn-ghost" @click="router.back()">
|
||||||
|
|||||||
Reference in New Issue
Block a user