Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
强哥很慌张
Echarts
提交
ed73906f
E
Echarts
项目概览
强哥很慌张
/
Echarts
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
Echarts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ed73906f
编写于
4月 26, 2020
作者:
1
100pah
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ts: tweak types.
上级
ea9ad4a8
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
23 addition
and
19 deletion
+23
-19
extension-src/bmap/BMapCoordSys.ts
extension-src/bmap/BMapCoordSys.ts
+1
-1
src/chart/helper/createClipPathFromCoordSys.ts
src/chart/helper/createClipPathFromCoordSys.ts
+4
-3
src/chart/treemap/TreemapSeries.ts
src/chart/treemap/TreemapSeries.ts
+1
-3
src/coord/CoordinateSystem.ts
src/coord/CoordinateSystem.ts
+2
-0
src/data/DataDiffer.ts
src/data/DataDiffer.ts
+10
-10
src/data/List.ts
src/data/List.ts
+2
-2
src/model/Model.ts
src/model/Model.ts
+3
-0
未找到文件。
extension-src/bmap/BMapCoordSys.ts
浏览文件 @
ed73906f
...
...
@@ -89,7 +89,7 @@ BMapCoordSys.prototype.getRoamTransform = function () {
return
matrix
.
create
();
};
BMapCoordSys
.
prototype
.
prepareCustoms
=
function
(
data
)
{
BMapCoordSys
.
prototype
.
prepareCustoms
=
function
()
{
const
rect
=
this
.
getViewRect
();
return
{
coordSys
:
{
...
...
src/chart/helper/createClipPathFromCoordSys.ts
浏览文件 @
ed73906f
...
...
@@ -23,6 +23,7 @@ import SeriesModel from '../../model/Series';
import
{
SeriesOption
}
from
'
../../util/types
'
;
import
type
Cartesian2D
from
'
../../coord/cartesian/Cartesian2D
'
;
import
type
Polar
from
'
../../coord/polar/Polar
'
;
import
{
CoordinateSystem
}
from
'
../../coord/CoordinateSystem
'
;
type
SeriesModelWithLineWidth
=
SeriesModel
<
SeriesOption
&
{
lineStyle
?:
{
width
?:
number
}
...
...
@@ -101,7 +102,7 @@ function createPolarClipPath(
}
function
createClipPath
(
coordSys
:
Polar
|
Cartesian2D
,
coordSys
:
CoordinateSystem
,
hasAnimation
:
boolean
,
seriesModel
:
SeriesModelWithLineWidth
)
{
...
...
@@ -109,10 +110,10 @@ function createClipPath(
return
null
;
}
else
if
(
coordSys
.
type
===
'
polar
'
)
{
return
createPolarClipPath
(
coordSys
,
hasAnimation
,
seriesModel
);
return
createPolarClipPath
(
coordSys
as
Polar
,
hasAnimation
,
seriesModel
);
}
else
if
(
coordSys
.
type
===
'
cartesian2d
'
)
{
return
createGridClipPath
(
coordSys
,
hasAnimation
,
seriesModel
);
return
createGridClipPath
(
coordSys
as
Cartesian2D
,
hasAnimation
,
seriesModel
);
}
return
null
;
}
...
...
src/chart/treemap/TreemapSeries.ts
浏览文件 @
ed73906f
...
...
@@ -200,9 +200,7 @@ class TreemapSeriesModel extends SeriesModel<TreemapSeriesOption> {
static
type
=
'
series.treemap
'
;
type
=
TreemapSeriesModel
.
type
;
layoutMode
=
'
box
'
;
dependencies
=
[
'
grid
'
,
'
polar
'
];
static
layoutMode
=
'
box
'
as
const
;
preventUsingHoverLayer
=
true
;
...
...
src/coord/CoordinateSystem.ts
浏览文件 @
ed73906f
...
...
@@ -26,6 +26,7 @@ import { BoundingRect } from '../util/graphic';
import
{
MatrixArray
}
from
'
zrender/src/core/matrix
'
;
import
ComponentModel
from
'
../model/Component
'
;
import
{
RectLike
}
from
'
zrender/src/core/BoundingRect
'
;
import
{
PrepareCustomInfo
}
from
'
../chart/custom
'
;
export
interface
CoordinateSystemCreator
{
...
...
@@ -152,6 +153,7 @@ export interface CoordinateSystem {
// But if other coordinate systems implement it, should follow this signature.
getAxesByScale
?:
(
scaleType
:
string
)
=>
Axis
[];
prepareCustoms
?:
PrepareCustomInfo
;
}
/**
...
...
src/data/DataDiffer.ts
浏览文件 @
ed73906f
...
...
@@ -20,38 +20,38 @@
import
{
ArrayLike
}
from
'
zrender/src/core/types
'
;
// return key.
export
type
DiffKeyGetter
=
(
this
:
DataDiffer
,
value
:
any
,
index
:
number
)
=>
string
;
export
type
DiffKeyGetter
=
(
this
:
DataDiffer
,
value
:
unknown
,
index
:
number
)
=>
string
;
export
type
DiffCallbackAdd
=
(
newIndex
:
number
)
=>
void
;
export
type
DiffCallbackUpdate
=
(
newIndex
:
number
,
oldIndex
:
number
)
=>
void
;
export
type
DiffCallbackRemove
=
(
oldIndex
:
number
)
=>
void
;
type
DataIndexMap
=
{[
key
:
string
]:
number
|
number
[]};
function
defaultKeyGetter
<
T
>
(
item
:
T
):
T
{
function
defaultKeyGetter
(
item
:
string
):
string
{
return
item
;
}
class
DataDiffer
{
class
DataDiffer
<
Ctx
=
unknown
>
{
private
_old
:
ArrayLike
<
any
>
;
private
_new
:
ArrayLike
<
any
>
;
private
_old
:
ArrayLike
<
unknown
>
;
private
_new
:
ArrayLike
<
unknown
>
;
private
_oldKeyGetter
:
DiffKeyGetter
;
private
_newKeyGetter
:
DiffKeyGetter
;
private
_add
:
DiffCallbackAdd
;
private
_update
:
DiffCallbackUpdate
;
private
_remove
:
DiffCallbackRemove
;
readonly
context
:
any
;
readonly
context
:
Ctx
;
/**
* @param context Can be visited by this.context in callback.
*/
constructor
(
oldArr
:
ArrayLike
<
any
>
,
newArr
:
ArrayLike
<
any
>
,
oldArr
:
ArrayLike
<
unknown
>
,
newArr
:
ArrayLike
<
unknown
>
,
oldKeyGetter
?:
DiffKeyGetter
,
newKeyGetter
?:
DiffKeyGetter
,
context
?:
any
context
?:
Ctx
)
{
this
.
_old
=
oldArr
;
this
.
_new
=
newArr
;
...
...
@@ -144,7 +144,7 @@ class DataDiffer {
}
private
_initIndexMap
(
arr
:
ArrayLike
<
any
>
,
arr
:
ArrayLike
<
unknown
>
,
map
:
DataIndexMap
,
keyArr
:
string
[],
keyGetterName
:
'
_oldKeyGetter
'
|
'
_newKeyGetter
'
...
...
src/data/List.ts
浏览文件 @
ed73906f
...
...
@@ -1603,10 +1603,10 @@ class List<
return
new
DataDiffer
(
otherList
?
otherList
.
getIndices
()
:
[],
this
.
getIndices
(),
function
(
idx
)
{
function
(
idx
:
number
)
{
return
getId
(
otherList
,
idx
);
},
function
(
idx
)
{
function
(
idx
:
number
)
{
return
getId
(
thisList
,
idx
);
}
);
...
...
src/model/Model.ts
浏览文件 @
ed73906f
...
...
@@ -147,6 +147,9 @@ class Model<Opt extends ModelOption = ModelOption> { // TODO: TYPE use unkown
getModel
<
R
extends
keyof
Opt
,
S
extends
keyof
Opt
[
R
]
>
(
path
:
readonly
[
R
,
S
],
parentModel
?:
Model
):
Model
<
Opt
[
R
][
S
]
>
;
getModel
<
Ra
extends
keyof
Opt
,
Rb
extends
keyof
Opt
,
S
extends
keyof
Opt
[
Rb
]
>
(
path
:
readonly
[
Ra
]
|
readonly
[
Rb
,
S
],
parentModel
?:
Model
):
Model
<
Opt
[
Ra
]
>
|
Model
<
Opt
[
Rb
][
S
]
>
;
getModel
<
R
extends
keyof
Opt
,
S
extends
keyof
Opt
[
R
],
T
extends
keyof
Opt
[
R
][
S
]
>
(
path
:
readonly
[
R
,
S
,
T
],
parentModel
?:
Model
):
Model
<
Opt
[
R
][
S
][
T
]
>
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录