Skip to content

Commit

Permalink
fix: don't zoom when clicking itinerary
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-heppner-ibigroup committed Oct 28, 2024
1 parent 4c6b236 commit f469584
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/components/app/responsive-webapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class ResponsiveWebapp extends Component {
/* eslint-disable-next-line complexity */
componentDidUpdate(prevProps) {
const {
activeItinerary,
activeSearchId,
autoFly,
currentPosition,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit f469584

Please sign in to comment.