Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
ea52994c
I
incubator-echarts
项目概览
x649585723
/
incubator-echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
incubator-echarts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
ea52994c
编写于
4月 18, 2014
作者:
K
kener
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zrender 2.0 merge
上级
2909d9f3
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
75 addition
and
154 deletion
+75
-154
src/chart/chord.js
src/chart/chord.js
+2
-10
src/chart/line.js
src/chart/line.js
+2
-2
src/chart/map.js
src/chart/map.js
+4
-4
src/chart/pie.js
src/chart/pie.js
+6
-26
src/component/base.js
src/component/base.js
+4
-16
src/component/categoryAxis.js
src/component/categoryAxis.js
+5
-19
src/component/legend.js
src/component/legend.js
+4
-8
src/component/polar.js
src/component/polar.js
+3
-0
src/component/title.js
src/component/title.js
+3
-11
src/component/tooltip.js
src/component/tooltip.js
+5
-13
src/component/valueAxis.js
src/component/valueAxis.js
+2
-10
src/echarts.js
src/echarts.js
+6
-18
src/util/ecQuery.js
src/util/ecQuery.js
+1
-2
src/util/shape/HandlePolygon.js
src/util/shape/HandlePolygon.js
+3
-2
src/util/shape/Icon.js
src/util/shape/Icon.js
+8
-7
src/util/shape/MarkLine.js
src/util/shape/MarkLine.js
+14
-5
src/util/shape/Symbol.js
src/util/shape/Symbol.js
+3
-1
未找到文件。
src/chart/chord.js
浏览文件 @
ea52994c
...
...
@@ -729,19 +729,11 @@ define(function(require) {
var
_merge
=
zrUtil
.
merge
;
opt
=
_merge
(
opt
||
{},
ecConfig
.
chord
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
ecConfig
.
chord
);
opt
.
itemStyle
.
normal
.
label
.
textStyle
=
_merge
(
opt
.
itemStyle
.
normal
.
label
.
textStyle
||
{},
ecConfig
.
textStyle
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
ecConfig
.
textStyle
);
}
...
...
src/chart/line.js
浏览文件 @
ea52994c
...
...
@@ -39,7 +39,7 @@ define(function(require) {
var
_symbol
=
ecConfig
.
symbolList
;
var
_sIndex2ShapeMap
=
{};
// series拐点图形类型,seriesIndex索引到shape type
IconShape
.
iconLibrary
[
'
legendLineIcon
'
]
=
legendLineIcon
;
IconShape
.
prototype
.
iconLibrary
[
'
legendLineIcon
'
]
=
legendLineIcon
;
function
_buildShape
()
{
finalPLMap
=
{};
...
...
@@ -1047,7 +1047,7 @@ define(function(require) {
x
+=
Math
.
round
((
width
-
height
)
/
2
)
-
1
;
width
=
height
=
height
+
2
;
}
symbol
=
IconShape
.
iconLibrary
[
symbol
];
symbol
=
IconShape
.
prototype
.
iconLibrary
[
symbol
];
if
(
symbol
)
{
var
x2
=
style
.
x
;
...
...
src/chart/map.js
浏览文件 @
ea52994c
...
...
@@ -95,13 +95,13 @@ define(function(require) {
||
{};
if
(
series
[
i
].
textFixed
)
{
zrUtil
.
merge
Fast
(
_textFixed
,
series
[
i
].
textFixed
,
true
,
false
zrUtil
.
merge
(
_textFixed
,
series
[
i
].
textFixed
,
true
);
}
if
(
series
[
i
].
geoCoord
)
{
zrUtil
.
merge
Fast
(
_geoCoord
,
series
[
i
].
geoCoord
,
true
,
false
zrUtil
.
merge
(
_geoCoord
,
series
[
i
].
geoCoord
,
true
);
}
...
...
src/chart/pie.js
浏览文件 @
ea52994c
...
...
@@ -400,11 +400,7 @@ define(function(require) {
// serie里有默认配置,放心大胆的用!
var
itemStyle
=
zrUtil
.
merge
(
zrUtil
.
clone
(
data
.
itemStyle
)
||
{},
serie
.
itemStyle
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
serie
.
itemStyle
);
// label配置
var
labelControl
=
itemStyle
[
status
].
label
;
...
...
@@ -540,11 +536,7 @@ define(function(require) {
// serie里有默认配置,放心大胆的用!
var
itemStyle
=
zrUtil
.
merge
(
zrUtil
.
clone
(
data
.
itemStyle
)
||
{},
serie
.
itemStyle
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
serie
.
itemStyle
);
// labelLine配置
var
labelLineControl
=
itemStyle
[
status
].
labelLine
;
...
...
@@ -563,7 +555,7 @@ define(function(require) {
var
cosValue
=
zrMath
.
cos
(
midAngle
,
true
);
var
sinValue
=
zrMath
.
sin
(
midAngle
,
true
);
// 三角函数缓存已在zrender/tool/math中做了
return
new
B
or
kenLineShape
({
return
new
B
ro
kenLineShape
({
shape
:
'
brokenLine
'
,
zlevel
:
_zlevelBase
+
1
,
hoverable
:
false
,
...
...
@@ -638,29 +630,17 @@ define(function(require) {
var
_merge
=
zrUtil
.
merge
;
opt
=
_merge
(
opt
||
{},
ecConfig
.
pie
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
ecConfig
.
pie
);
// 通用字体设置
opt
.
itemStyle
.
normal
.
label
.
textStyle
=
_merge
(
opt
.
itemStyle
.
normal
.
label
.
textStyle
||
{},
ecConfig
.
textStyle
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
ecConfig
.
textStyle
);
opt
.
itemStyle
.
emphasis
.
label
.
textStyle
=
_merge
(
opt
.
itemStyle
.
emphasis
.
label
.
textStyle
||
{},
ecConfig
.
textStyle
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
ecConfig
.
textStyle
);
return
opt
;
...
...
src/component/base.js
浏览文件 @
ea52994c
...
...
@@ -93,10 +93,7 @@ define(function(require) {
return
zrUtil
.
merge
(
opt
||
{},
zrUtil
.
clone
(
ecConfig
[
self
.
type
]
||
{}),
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
false
);
}
...
...
@@ -129,8 +126,7 @@ define(function(require) {
function
getFont
(
textStyle
)
{
var
finalTextStyle
=
zrUtil
.
merge
(
zrUtil
.
clone
(
textStyle
)
||
{},
ecConfig
.
textStyle
,
{
'
overwrite
'
:
false
}
ecConfig
.
textStyle
);
return
finalTextStyle
.
fontStyle
+
'
'
+
finalTextStyle
.
fontWeight
+
'
'
...
...
@@ -356,11 +352,7 @@ define(function(require) {
function
_markPoint
(
serie
,
seriesIndex
,
mpOption
,
component
)
{
zrUtil
.
merge
(
mpOption
,
ecConfig
.
markPoint
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
ecConfig
.
markPoint
);
mpOption
.
name
=
serie
.
name
;
...
...
@@ -448,11 +440,7 @@ define(function(require) {
function
_markLine
(
serie
,
seriesIndex
,
mlOption
,
component
)
{
zrUtil
.
merge
(
mlOption
,
ecConfig
.
markLine
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
ecConfig
.
markLine
);
// 标准化一些同时支持Array和String的参数
mlOption
.
symbol
=
mlOption
.
symbol
instanceof
Array
...
...
src/component/categoryAxis.js
浏览文件 @
ea52994c
...
...
@@ -98,11 +98,7 @@ define(function (require) {
self
.
getFont
(
zrUtil
.
merge
(
data
[
i
].
textStyle
,
option
.
axisLabel
.
textStyle
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
option
.
axisLabel
.
textStyle
)
)
);
...
...
@@ -352,8 +348,7 @@ define(function (require) {
}
dataTextStyle
=
zrUtil
.
merge
(
data
[
i
].
textStyle
||
{},
textStyle
,
{
'
overwrite
'
:
false
}
textStyle
);
axShape
=
{
shape
:
'
text
'
,
...
...
@@ -404,8 +399,7 @@ define(function (require) {
}
dataTextStyle
=
zrUtil
.
merge
(
data
[
i
].
textStyle
||
{},
textStyle
,
{
'
overwrite
'
:
false
}
textStyle
);
axShape
=
{
shape
:
'
text
'
,
...
...
@@ -631,19 +625,11 @@ define(function (require) {
// 通用字体设置
option
.
axisLabel
.
textStyle
=
zrUtil
.
merge
(
option
.
axisLabel
.
textStyle
||
{},
ecConfig
.
textStyle
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
ecConfig
.
textStyle
);
option
.
axisLabel
.
textStyle
=
zrUtil
.
merge
(
option
.
axisLabel
.
textStyle
||
{},
ecConfig
.
textStyle
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
ecConfig
.
textStyle
);
}
self
.
clear
();
...
...
src/component/legend.js
浏览文件 @
ea52994c
...
...
@@ -90,8 +90,7 @@ define(function (require) {
for
(
var
i
=
0
;
i
<
dataLength
;
i
++
)
{
dataTextStyle
=
zrUtil
.
merge
(
data
[
i
].
textStyle
||
{},
textStyle
,
{
'
overwrite
'
:
false
}
textStyle
);
dataFont
=
self
.
getFont
(
dataTextStyle
);
...
...
@@ -324,8 +323,7 @@ define(function (require) {
}
dataTextStyle
=
zrUtil
.
merge
(
data
[
i
].
textStyle
||
{},
textStyle
,
{
'
overwrite
'
:
false
}
textStyle
);
temp
+=
itemWidth
+
zrArea
.
getTextWidth
(
...
...
@@ -333,8 +331,7 @@ define(function (require) {
data
[
i
].
textStyle
?
self
.
getFont
(
zrUtil
.
merge
(
data
[
i
].
textStyle
||
{},
textStyle
,
{
'
overwrite
'
:
false
}
textStyle
))
:
font
)
...
...
@@ -359,8 +356,7 @@ define(function (require) {
data
[
i
].
textStyle
?
self
.
getFont
(
zrUtil
.
merge
(
data
[
i
].
textStyle
||
{},
textStyle
,
{
'
overwrite
'
:
false
}
textStyle
))
:
font
)
...
...
src/component/polar.js
浏览文件 @
ea52994c
...
...
@@ -257,6 +257,9 @@ define(function(require) {
vector
[
0
],
vector
[
1
]
];
}
else
{
rotation
=
[
0
,
0
,
0
];
}
self
.
shapeList
.
push
(
new
TextShape
({
style
:
style
,
...
...
src/component/title.js
浏览文件 @
ea52994c
...
...
@@ -134,7 +134,7 @@ define(function (require) {
}
self
.
shapeList
.
push
(
new
TextShape
(
textShape
));
subtext
!==
''
&&
self
.
shapeList
.
push
(
new
TextS
ah
pe
(
subtextShape
));
subtext
!==
''
&&
self
.
shapeList
.
push
(
new
TextS
ha
pe
(
subtextShape
));
}
function
_buildBackground
()
{
...
...
@@ -250,19 +250,11 @@ define(function (require) {
titleOption
=
option
.
title
;
titleOption
.
textStyle
=
zrUtil
.
merge
(
titleOption
.
textStyle
,
ecConfig
.
textStyle
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
false
}
ecConfig
.
textStyle
);
titleOption
.
subtextStyle
=
zrUtil
.
merge
(
titleOption
.
subtextStyle
,
ecConfig
.
textStyle
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
false
}
ecConfig
.
textStyle
);
self
.
clear
();
...
...
src/component/tooltip.js
浏览文件 @
ea52994c
...
...
@@ -8,6 +8,7 @@
define
(
function
(
require
)
{
var
LineShape
=
require
(
'
zrender/shape/Line
'
);
var
RectangleShape
=
require
(
'
zrender/shape/Rectangle
'
);
var
rectangleInstance
=
new
RectangleShape
({});
/**
* 构造函数
...
...
@@ -77,7 +78,7 @@ define(function (require) {
// strokeColor : ecConfig.categoryAxis.axisLine.lineStyle.color
}
});
var
_axisShadowShape
=
LineShape
({
var
_axisShadowShape
=
new
LineShape
({
zlevel
:
1
,
// grid上,chart下
invisible
:
true
,
hoverable
:
false
,
...
...
@@ -1130,7 +1131,7 @@ define(function (require) {
if
(
_needAxisTrigger
&&
grid
&&
zrArea
.
isInside
(
RectangleShap
e
,
rectangleInstanc
e
,
grid
.
getArea
(),
mx
,
my
...
...
@@ -1497,11 +1498,7 @@ define(function (require) {
option
.
tooltip
=
self
.
reformOption
(
option
.
tooltip
);
option
.
tooltip
.
textStyle
=
zrUtil
.
merge
(
option
.
tooltip
.
textStyle
,
ecConfig
.
textStyle
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
ecConfig
.
textStyle
);
// 补全padding属性
option
.
tooltip
.
padding
=
self
.
reformCssArray
(
...
...
@@ -1520,7 +1517,6 @@ define(function (require) {
break
;
}
}
_showDelay
=
option
.
tooltip
.
showDelay
;
_hideDelay
=
option
.
tooltip
.
hideDelay
;
_defaultCssText
=
_style
(
option
.
tooltip
);
...
...
@@ -1540,11 +1536,7 @@ define(function (require) {
option
.
tooltip
=
self
.
reformOption
(
option
.
tooltip
);
option
.
tooltip
.
textStyle
=
zrUtil
.
merge
(
option
.
tooltip
.
textStyle
,
ecConfig
.
textStyle
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
ecConfig
.
textStyle
);
// 补全padding属性
option
.
tooltip
.
padding
=
self
.
reformCssArray
(
...
...
src/component/valueAxis.js
浏览文件 @
ea52994c
...
...
@@ -851,19 +851,11 @@ define(function (require) {
// 通用字体设置
option
.
axisLabel
.
textStyle
=
zrUtil
.
merge
(
option
.
axisLabel
.
textStyle
||
{},
ecConfig
.
textStyle
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
ecConfig
.
textStyle
);
option
.
axisLabel
.
textStyle
=
zrUtil
.
merge
(
option
.
axisLabel
.
textStyle
||
{},
ecConfig
.
textStyle
,
{
'
overwrite
'
:
false
,
'
recursive
'
:
true
}
ecConfig
.
textStyle
);
series
=
newSeries
;
}
...
...
src/echarts.js
浏览文件 @
ea52994c
...
...
@@ -128,10 +128,6 @@ define(function(require) {
_zr
.
on
(
zrConfig
.
EVENT
.
DRAGLEAVE
,
_ondragleave
);
_zr
.
on
(
zrConfig
.
EVENT
.
DROP
,
_ondrop
);
// 动态扩展zrender shape:icon、markLine
require
(
'
./util/shape/icon
'
);
require
(
'
./util/shape/markLine
'
);
// 内置图表注册
var
chartLibrary
=
require
(
'
./chart
'
);
require
(
'
./chart/island
'
);
...
...
@@ -894,16 +890,13 @@ define(function(require) {
var
zrUtil
=
require
(
'
zrender/tool/util
'
);
zrUtil
.
merge
(
magicOption
,
param
.
option
,
{
'
overwrite
'
:
true
,
'
recursive
'
:
true
}
magicOption
,
param
.
option
,
true
);
zrUtil
.
merge
(
_optionBackup
,
param
.
option
,
{
'
overwrite
'
:
true
,
'
recursive
'
:
true
}
_optionBackup
,
param
.
option
,
true
);
zrUtil
.
merge
(
_optionRestore
,
param
.
option
,
{
'
overwrite
'
:
true
,
'
recursive
'
:
true
}
_optionRestore
,
param
.
option
,
true
);
_island
.
refresh
(
magicOption
);
_toolbox
.
refresh
(
magicOption
);
...
...
@@ -1023,10 +1016,7 @@ define(function(require) {
zrUtil
.
merge
(
_option
,
zrUtil
.
clone
(
option
),
{
'
overwrite
'
:
true
,
'
recursive
'
:
true
}
true
);
}
else
{
...
...
@@ -1529,8 +1519,7 @@ define(function(require) {
var
finalTextStyle
=
zrUtil
.
merge
(
zrUtil
.
clone
(
loadingOption
.
textStyle
),
_themeConfig
.
textStyle
,
{
'
overwrite
'
:
false
}
_themeConfig
.
textStyle
);
loadingOption
.
textStyle
.
textFont
=
finalTextStyle
.
fontStyle
+
'
'
+
finalTextStyle
.
fontWeight
+
'
'
...
...
@@ -1599,8 +1588,7 @@ define(function(require) {
// 应用新主题
zrUtil
.
merge
(
_themeConfig
,
zrUtil
.
clone
(
theme
),
{
'
overwrite
'
:
true
,
'
recursive
'
:
true
}
_themeConfig
,
zrUtil
.
clone
(
theme
),
true
);
}
...
...
src/util/ecQuery.js
浏览文件 @
ea52994c
...
...
@@ -64,8 +64,7 @@ define(function() {
}
else
{
zrUtil
.
merge
(
finalOption
,
tempOption
,
{
'
overwrite
'
:
true
,
'
recursive
'
:
true
}
finalOption
,
tempOption
,
true
);
}
}
...
...
src/util/shape/HandlePolygon.js
浏览文件 @
ea52994c
...
...
@@ -8,6 +8,7 @@
define
(
function
(
require
)
{
var
Base
=
require
(
'
zrender/shape/Base
'
);
var
PolygonShape
=
require
(
'
zrender/shape/Polygon
'
);
var
matrix
=
require
(
'
zrender/tool/matrix
'
);
function
HandlePolygon
(
options
)
{
...
...
@@ -22,7 +23,7 @@ define(
* @param {Object} style 样式
*/
buildPath
:
function
(
ctx
,
style
)
{
require
(
'
zrender/shape
'
).
get
(
'
polygon
'
)
.
buildPath
(
PolygonShape
.
prototype
.
buildPath
(
ctx
,
style
);
return
;
...
...
@@ -45,7 +46,7 @@ define(
y
=
originPos
[
1
];
}
var
rect
=
e
.
style
.
rect
;
var
rect
=
this
.
style
.
rect
;
if
(
x
>=
rect
.
x
&&
x
<=
(
rect
.
x
+
rect
.
width
)
&&
y
>=
rect
.
y
...
...
src/util/shape/Icon.js
浏览文件 @
ea52994c
...
...
@@ -340,10 +340,10 @@ define(
}
function
_iconStar
(
ctx
,
style
)
{
var
StarShape
=
require
(
'
zrender/shape/Star
'
);
var
width
=
style
.
width
/
2
;
var
height
=
style
.
height
/
2
;
var
star
=
require
(
'
zrender/shape
'
).
get
(
'
star
'
);
star
.
buildPath
(
ctx
,
{
StarShape
.
prototype
.
buildPath
(
ctx
,
{
x
:
style
.
x
+
width
,
y
:
style
.
y
+
height
,
r
:
Math
.
min
(
width
,
height
),
...
...
@@ -352,8 +352,8 @@ define(
}
function
_iconHeart
(
ctx
,
style
)
{
var
heart
=
require
(
'
zrender/shape
'
).
get
(
'
h
eart
'
);
heart
.
buildPath
(
ctx
,
{
var
HeartShape
=
require
(
'
zrender/shape/H
eart
'
);
HeartShape
.
prototype
.
buildPath
(
ctx
,
{
x
:
style
.
x
+
style
.
width
/
2
,
y
:
style
.
y
+
style
.
height
*
0.2
,
a
:
style
.
width
/
2
,
...
...
@@ -362,8 +362,8 @@ define(
}
function
_iconDroplet
(
ctx
,
style
)
{
var
droplet
=
require
(
'
zrender/shape
'
).
get
(
'
d
roplet
'
);
droplet
.
buildPath
(
ctx
,
{
var
DropletShape
=
require
(
'
zrender/shape/D
roplet
'
);
DropletShape
.
prototype
.
buildPath
(
ctx
,
{
x
:
style
.
x
+
style
.
width
*
0.5
,
y
:
style
.
y
+
style
.
height
*
0.5
,
a
:
style
.
width
*
0.5
,
...
...
@@ -389,7 +389,8 @@ define(
function
_iconImage
(
ctx
,
style
)
{
setTimeout
(
function
(){
require
(
'
zrender/shape
'
).
get
(
'
image
'
).
brush
(
ctx
,
{
var
ImageShape
=
require
(
'
zrender/shape/Image
'
);
ImageShape
.
prototype
.
brush
(
ctx
,
{
style
:
style
});
},
100
);
...
...
src/util/shape/MarkLine.js
浏览文件 @
ea52994c
...
...
@@ -8,8 +8,17 @@
define
(
function
(
require
)
{
var
Base
=
require
(
'
zrender/shape/Base
'
);
var
IconShape
=
require
(
'
./Icon
'
);
var
LineShape
=
require
(
'
zrender/shape/Line
'
);
var
lineInstance
=
new
LineShape
({});
var
BrokenLineShape
=
require
(
'
zrender/shape/BrokenLine
'
);
var
brokenLineInstance
=
new
BrokenLineShape
({});
var
matrix
=
require
(
'
zrender/tool/matrix
'
);
var
area
=
require
(
'
zrender/tool/area
'
);
var
dashedLineTo
=
require
(
'
zrender/shape/util/dashedLineTo
'
);
var
smoothSpline
=
require
(
'
zrender/shape/util/smoothSpline
'
);
function
MarkLine
(
options
)
{
Base
.
call
(
this
,
options
);
...
...
@@ -87,7 +96,7 @@ define(
*
(
style
.
lineType
==
'
dashed
'
?
5
:
1
);
ctx
.
moveTo
(
pointList
[
0
][
0
],
pointList
[
0
][
1
]);
for
(
var
i
=
1
;
i
<
len
;
i
++
)
{
this
.
dashedLineTo
(
dashedLineTo
(
ctx
,
pointList
[
i
-
1
][
0
],
pointList
[
i
-
1
][
1
],
pointList
[
i
][
0
],
pointList
[
i
][
1
],
...
...
@@ -158,7 +167,7 @@ define(
style
.
y
=
y
-
symbolSize
,
style
.
width
=
symbolSize
*
2
;
style
.
height
=
symbolSize
*
2
;
require
(
'
zrender/shape
'
).
get
(
'
icon
'
)
.
buildPath
(
ctx
,
style
);
IconShape
.
prototype
.
buildPath
(
ctx
,
style
);
}
ctx
.
closePath
();
...
...
@@ -254,7 +263,7 @@ define(
pointList
[
3
]
=
[
lastPointX
,
lastPointY
];
pointList
[
1
]
=
this
.
getOffetPoint
(
pointList
[
0
],
pointList
[
3
]);
pointList
[
2
]
=
this
.
getOffetPoint
(
pointList
[
3
],
pointList
[
0
]);
pointList
=
this
.
smoothSpline
(
pointList
,
false
);
pointList
=
smoothSpline
(
pointList
,
false
);
// 修正最后一点在插值产生的偏移
pointList
[
pointList
.
length
-
1
]
=
[
lastPointX
,
lastPointY
];
}
...
...
@@ -329,8 +338,8 @@ define(
isCover
:
function
(
x
,
y
)
{
return
this
.
style
.
smooth
!==
'
spline
'
?
area
.
isInside
(
require
(
'
zrender/shape/Line
'
)
,
this
.
style
,
x
,
y
)
:
area
.
isInside
(
require
(
'
zrender/shape/BrokenLine
'
)
,
this
.
style
,
x
,
y
);
?
area
.
isInside
(
lineInstance
,
this
.
style
,
x
,
y
)
:
area
.
isInside
(
brokenLineInstance
,
this
.
style
,
x
,
y
);
}
};
...
...
src/util/shape/Symbol.js
浏览文件 @
ea52994c
...
...
@@ -34,6 +34,8 @@
define
(
function
(
require
)
{
var
Base
=
require
(
'
zrender/shape/Base
'
);
var
PolygonShape
=
require
(
'
zrender/shape/Polygon
'
)
var
polygonInstance
=
new
PolygonShape
({});
function
Symbol
(
options
)
{
Base
.
call
(
this
,
options
);
...
...
@@ -91,7 +93,7 @@ define(
* @param {Object} style
*/
getRect
:
function
(
style
)
{
return
require
(
'
zrender/shape/Polygon
'
)
.
getRect
(
style
);
return
polygonInstance
.
getRect
(
style
);
},
isCover
:
function
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录