Skip to content

Commit 87b2f77

Browse files
authored
Merge pull request #21052 from apache/next-merge
chore: use zrender next branch and merge from master
2 parents d172a35 + c86b9ce commit 87b2f77

File tree

8 files changed

+29
-31
lines changed

8 files changed

+29
-31
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
},
6666
"dependencies": {
6767
"tslib": "2.3.0",
68-
"zrender": "github:ecomfe/zrender#v6"
68+
"zrender": "github:ecomfe/zrender#next"
6969
},
7070
"devDependencies": {
7171
"@babel/code-frame": "7.10.4",
@@ -224,4 +224,4 @@
224224
"./dist/extension/dataTool.min": "./dist/extension/dataTool.min.js",
225225
"./*": "./*"
226226
}
227-
}
227+
}

src/coord/CoordinateSystem.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ export interface CoordinateSystemMaster {
8585
convertToLayout?(
8686
ecModel: GlobalModel,
8787
finder: ParsedModelFinder,
88-
value: Parameters<CoordinateSystem['dataToLayout']>[0],
88+
value: Parameters<NonNullable<CoordinateSystem['dataToLayout']>>[0],
8989
opt?: unknown
90-
): ReturnType<CoordinateSystem['dataToLayout']> | NullUndefined;
90+
): ReturnType<NonNullable<CoordinateSystem['dataToLayout']>> | NullUndefined;
9191

9292
// This methods is also responsible for determining whether this
9393
// coordinate system is applicable to the given `finder`.
@@ -96,9 +96,9 @@ export interface CoordinateSystemMaster {
9696
convertFromPixel?(
9797
ecModel: GlobalModel,
9898
finder: ParsedModelFinder,
99-
pixelValue: Parameters<CoordinateSystem['pointToData']>[0],
99+
pixelValue: Parameters<NonNullable<CoordinateSystem['pointToData']>>[0],
100100
opt?: unknown
101-
): ReturnType<CoordinateSystem['pointToData']> | NullUndefined;
101+
): ReturnType<NonNullable<CoordinateSystem['pointToData']>> | NullUndefined;
102102

103103
// @param point Point in global pixel coordinate system.
104104
// The signature of this method should be the same as `CoordinateSystemExecutive`

src/coord/matrix/Matrix.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,20 @@ import { eqNaN, isArray, retrieve2 } from 'zrender/src/core/util';
3434
import Point from 'zrender/src/core/Point';
3535
import { WH, XY } from '../../util/graphic';
3636
import Model from '../../model/Model';
37-
import {
38-
MatrixCellLayoutInfo, MatrixCellLayoutInfoType,
37+
import type {
38+
MatrixCellLayoutInfo,
3939
MatrixDimensionCell, MatrixDimPair, MatrixXYLocator
4040
} from './MatrixDim';
4141
import { mathMax, mathMin, parsePositionSizeOption } from '../../util/number';
4242
import {
4343
createNaNRectLike,
4444
MatrixClampOption,
45+
MatrixCellLayoutInfoType,
4546
parseCoordRangeOption,
4647
resetXYLocatorRange,
4748
xyLocatorRangeToRectOneDim
4849
} from './matrixCoordHelper';
49-
import { MatrixBodyCorner, MatrixBodyOrCornerKind } from './MatrixBodyCorner';
50+
import type { MatrixBodyCorner, MatrixBodyOrCornerKind } from './MatrixBodyCorner';
5051
import { error } from '../../util/log';
5152
import { injectCoordSysByOption, simpleCoordSysInjectionProvider } from '../../core/CoordinateSystem';
5253

src/coord/matrix/MatrixBodyCorner.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
*/
1919

2020
import { HashMap, createHashMap, each, extend, isArray, isObject } from 'zrender/src/core/util';
21-
import { NullUndefined } from '../../util/types';
21+
import type { NullUndefined } from '../../util/types';
2222
import type { MatrixXYLocator, MatrixDimPair, MatrixXYLocatorRange } from './MatrixDim';
2323
import { error } from '../../util/log';
2424
import Point from 'zrender/src/core/Point';
2525
import { RectLike } from 'zrender/src/core/BoundingRect';
26-
import { MatrixBodyCornerCellOption, MatrixBodyOption, MatrixCornerOption } from './MatrixModel';
26+
import type { MatrixBodyCornerCellOption, MatrixBodyOption, MatrixCornerOption } from './MatrixModel';
2727
import {
2828
resolveXYLocatorRangeByCellMerge,
2929
MatrixClampOption,
@@ -34,7 +34,7 @@ import {
3434
resetXYLocatorRange,
3535
cloneXYLocatorRange,
3636
} from './matrixCoordHelper';
37-
import Model from '../../model/Model';
37+
import type Model from '../../model/Model';
3838

3939

4040
/**

src/coord/matrix/MatrixDim.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import {
22
createHashMap,
33
defaults,
4-
each, eqNaN, isArray, isObject, isString,
5-
retrieve2,
4+
each, eqNaN, isArray, isObject, isString
65
} from 'zrender/src/core/util';
76
import Point from 'zrender/src/core/Point';
87
import OrdinalMeta from '../../data/OrdinalMeta';
@@ -17,7 +16,7 @@ import { WH, XY } from '../../util/graphic';
1716
import { ListIterator } from '../../util/model';
1817
import { RectLike } from 'zrender/src/core/BoundingRect';
1918
import {
20-
createNaNRectLike, setDimXYValue
19+
createNaNRectLike, setDimXYValue, MatrixCellLayoutInfoType
2120
} from './matrixCoordHelper';
2221
import { error } from '../../util/log';
2322
import { mathMax } from '../../util/number';
@@ -43,12 +42,6 @@ export interface MatrixCellLayoutInfo {
4342
dim: MatrixDim;
4443
}
4544

46-
export const MatrixCellLayoutInfoType = {
47-
level: 1,
48-
leaf: 2,
49-
nonLeaf: 3,
50-
} as const;
51-
export type MatrixCellLayoutInfoType = (typeof MatrixCellLayoutInfoType)[keyof typeof MatrixCellLayoutInfoType];
5245

5346
export type MatrixXYLocator = MatrixCellLayoutInfo['id']['x'] | MatrixCellLayoutInfo['id']['y'];
5447
/**

src/coord/matrix/matrixCoordHelper.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,26 @@
1818
*/
1919

2020
import Point from 'zrender/src/core/Point';
21-
import {
22-
MatrixCellLayoutInfoType,
21+
import type {
2322
MatrixCellLayoutInfo,
2423
MatrixDimensionCell,
2524
MatrixDimPair,
2625
MatrixXYLocator,
2726
MatrixXYLocatorRange,
2827
} from './MatrixDim';
29-
import { NullUndefined } from '../../util/types';
28+
import type { NullUndefined } from '../../util/types';
3029
import { eqNaN, isArray, isNumber } from 'zrender/src/core/util';
3130
import { WH, XY } from '../../util/graphic';
32-
import { MatrixCoordRangeOption, MatrixCoordValueOption } from './MatrixModel';
33-
import { RectLike } from 'zrender/src/core/BoundingRect';
31+
import type { MatrixCoordRangeOption, MatrixCoordValueOption } from './MatrixModel';
32+
import type { RectLike } from 'zrender/src/core/BoundingRect';
3433
import { mathMax, mathMin } from '../../util/number';
3534

35+
export const MatrixCellLayoutInfoType = {
36+
level: 1,
37+
leaf: 2,
38+
nonLeaf: 3,
39+
} as const;
40+
export type MatrixCellLayoutInfoType = (typeof MatrixCellLayoutInfoType)[keyof typeof MatrixCellLayoutInfoType];
3641

3742
/**
3843
* @public Public to users in `chart.convertFromPixel`.

src/util/model.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ import CartesianAxisModel from '../coord/cartesian/AxisModel';
5454
import GridModel from '../coord/cartesian/GridModel';
5555
import { isNumeric, getRandomIdBase, getPrecision, round } from './number';
5656
import { error, warn } from './log';
57-
import type Model from '../model/Model';
5857

5958
function interpolateNumber(p0: number, p1: number, percent: number): number {
6059
return (p1 - p0) * percent + p0;

0 commit comments

Comments
 (0)