From 78be6f4be94f73be0188c68b047ecb8e14109df0 Mon Sep 17 00:00:00 2001 From: Anton Vorobev Date: Mon, 9 Sep 2024 11:17:06 +0000 Subject: [PATCH] Pull request #5288: Bugfix/DXCF-5613 chart lock scale doesn t work properly via zoom in out buttons Merge in DXCHARTS/dxchart5 from bugfix/DXCF-5613-chart-lock-scale-doesn-t-work-properly-via-zoom-in-out-buttons to master * commit '57b37e6ad2e2e22daf3072619f53f107f41fb5b2': [DXCF-5613] Chart - Lock scale doesn't work properly via zoom in/out buttons // init [DXCF-5613] Chart - Lock scale doesn't work properly via zoom in/out buttons // init GitOrigin-RevId: cebc153eef2dfbd8244ca1058d5bf721668fbc8a --- src/chart/model/scale.model.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chart/model/scale.model.ts b/src/chart/model/scale.model.ts index 7c772628..8309bb5b 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);