Skip to content

Commit 0162052

Browse files
committed
Zoom out more on smooth transitions
1 parent 7d3b6a8 commit 0162052

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/base/src/mainview/mainView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,6 @@ export class MainView extends React.Component<IProps, IStates> {
21112111
// Cancel any in-progress animations before starting new ones
21122112
view.cancelAnimations();
21132113

2114-
const currentZoom = view.getZoom() || 0;
21152114
const targetCenter: Coordinate = [center.x, center.y];
21162115

21172116
if (transitionType === 'linear') {
@@ -2128,7 +2127,8 @@ export class MainView extends React.Component<IProps, IStates> {
21282127
if (transitionType === 'smooth') {
21292128
// Smooth: zoom out, center, and zoom in
21302129
// Centering takes full duration, zoom out completes halfway, zoom in starts halfway
2131-
const zoomOutLevel = Math.min(currentZoom, zoom) - 1;
2130+
// 3 shows most of the map
2131+
const zoomOutLevel = 3;
21322132

21332133
// Start centering (full duration) and zoom out (50% duration) simultaneously
21342134
view.animate({

0 commit comments

Comments
 (0)