Skip to content

Commit bb282cd

Browse files
committed
Cancel animations before starting another
1 parent 62dc3f7 commit bb282cd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/base/src/mainview/mainView.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2106,6 +2106,10 @@ export class MainView extends React.Component<IProps, IStates> {
21062106
transitionType?: 'linear' | 'immediate' | 'smooth',
21072107
) {
21082108
const view = this._Map.getView();
2109+
2110+
// Cancel any in-progress animations before starting new ones
2111+
view.cancelAnimations();
2112+
21092113
const currentZoom = view.getZoom() || 0;
21102114
const targetCenter: Coordinate = [center.x, center.y];
21112115

0 commit comments

Comments
 (0)