From ee2374f92a6da8c696aafb90f198d8993d89bc84 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Wed, 7 Jan 2026 14:03:19 +0700 Subject: [PATCH] fix: full width for select-location page + restore space fly animation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- app/components/catalog/CatalogMap.vue | 15 ++++++++------- app/pages/select-location/index.vue | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/components/catalog/CatalogMap.vue b/app/components/catalog/CatalogMap.vue index 548be35..02f5421 100644 --- a/app/components/catalog/CatalogMap.vue +++ b/app/components/catalog/CatalogMap.vue @@ -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 }) } diff --git a/app/pages/select-location/index.vue b/app/pages/select-location/index.vue index 48ae5d6..67eaa09 100644 --- a/app/pages/select-location/index.vue +++ b/app/pages/select-location/index.vue @@ -1,5 +1,5 @@