@devexperts/dxcharts-lite 2.5.1 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,6 +12,7 @@ import { LabelsGroups } from './price_labels/y-axis-labels.model';
|
|
|
12
12
|
import { YAxisScaleHandler } from './y-axis-scale.handler';
|
|
13
13
|
import { YAxisModel } from './y-axis.model';
|
|
14
14
|
import { merge as mergeObj } from '../../utils/merge.utils';
|
|
15
|
+
import { cloneUnsafe } from '../../utils/object.utils';
|
|
15
16
|
/**
|
|
16
17
|
* Y axis component. Contains all Y axis related logic.
|
|
17
18
|
*/
|
|
@@ -28,7 +29,8 @@ export class YAxisComponent extends ChartBaseElement {
|
|
|
28
29
|
this.extentIdx = extentIdx;
|
|
29
30
|
this.labelsColorByChartTypeMap = {};
|
|
30
31
|
this.axisTypeSetSubject = new Subject();
|
|
31
|
-
|
|
32
|
+
const initialStateCopy = initialState ? cloneUnsafe(initialState) : {};
|
|
33
|
+
this.state = mergeObj(initialStateCopy, config.components.yAxis, {
|
|
32
34
|
overrideExisting: false,
|
|
33
35
|
addIfMissing: true,
|
|
34
36
|
});
|
|
@@ -170,7 +170,7 @@ export class ScaleModel extends ViewportModel {
|
|
|
170
170
|
setXScale(xStart, xEnd, forceNoAnimation = true) {
|
|
171
171
|
const initialState = this.export();
|
|
172
172
|
const zoomX = this.calculateZoomX(xStart, xEnd);
|
|
173
|
-
if (initialState.xStart === xStart && initialState.xEnd === xEnd) {
|
|
173
|
+
if (initialState.xStart === xStart && initialState.xEnd === xEnd && initialState.zoomX > 0) {
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
176
|
const state = Object.assign(Object.assign({}, initialState), { zoomX, xStart, xEnd });
|
|
@@ -196,7 +196,7 @@ export class ScaleModel extends ViewportModel {
|
|
|
196
196
|
}
|
|
197
197
|
setYScale(yStart, yEnd, fire = false) {
|
|
198
198
|
const initialState = this.export();
|
|
199
|
-
if (initialState.yStart === yStart && initialState.yEnd === yEnd) {
|
|
199
|
+
if (initialState.yStart === yStart && initialState.yEnd === yEnd && initialState.zoomY > 0) {
|
|
200
200
|
return;
|
|
201
201
|
}
|
|
202
202
|
super.setYScale(yStart, yEnd, fire);
|