From f469584f6ce435d4013516e2dd721dc184874fb2 Mon Sep 17 00:00:00 2001 From: Daniel Heppner Date: Mon, 28 Oct 2024 15:29:58 -0700 Subject: [PATCH] fix: don't zoom when clicking itinerary --- lib/components/app/responsive-webapp.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/components/app/responsive-webapp.js b/lib/components/app/responsive-webapp.js index dc7d26f72..be55b6ca5 100644 --- a/lib/components/app/responsive-webapp.js +++ b/lib/components/app/responsive-webapp.js @@ -57,6 +57,7 @@ class ResponsiveWebapp extends Component { /* eslint-disable-next-line complexity */ componentDidUpdate(prevProps) { const { + activeItinerary, activeSearchId, autoFly, currentPosition, @@ -100,7 +101,11 @@ class ResponsiveWebapp extends Component { setLocationToCurrent({ locationType: 'from' }, intl) setMapCenter(map, pt) } - } else if (mainPanelContent === null && autoFly !== false) { + } else if ( + mainPanelContent === null && + autoFly !== false && + activeItinerary === null + ) { if (query.from && query.to) { map?.fitBounds([query.from, query.to], { duration: 600,