diff --git a/src/chart/model/scale.model.ts b/src/chart/model/scale.model.ts index 7c77262..8309bb5 100644 --- a/src/chart/model/scale.model.ts +++ b/src/chart/model/scale.model.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 - 2023 Devexperts Solutions IE Limited + * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -181,7 +181,7 @@ export class ScaleModel extends ViewportModel { } private zoomXTo(state: ViewportModelState, zoomIn: boolean, forceNoAnimation?: boolean) { - const initialStateCopy = { ...state }; + const initialStateCopy = this.export(); const constrainedState = this.scalePostProcessor(initialStateCopy, state); this.zoomReached = this.calculateZoomReached(constrainedState.zoomX, zoomIn);