Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
409bdca2
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,发现更多精彩内容 >>
提交
409bdca2
编写于
4月 29, 2014
作者:
K
kener
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modShape优化
上级
d6c8cbcd
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
41 addition
and
51 deletion
+41
-51
src/chart/chord.js
src/chart/chord.js
+4
-7
src/chart/force.js
src/chart/force.js
+13
-13
src/chart/island.js
src/chart/island.js
+2
-2
src/chart/map.js
src/chart/map.js
+3
-10
src/component/dataRange.js
src/component/dataRange.js
+6
-6
src/component/dataZoom.js
src/component/dataZoom.js
+8
-8
src/component/tooltip.js
src/component/tooltip.js
+5
-5
未找到文件。
src/chart/chord.js
浏览文件 @
409bdca2
...
...
@@ -296,10 +296,7 @@ define(function (require) {
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
self
.
sectorShapes
[
i
].
style
.
opacity
=
i
===
idx
?
1
:
0.1
;
self
.
zr
.
modShape
(
self
.
sectorShapes
[
i
].
id
,
self
.
sectorShapes
[
i
]
);
self
.
zr
.
modShape
(
self
.
sectorShapes
[
i
].
id
);
for
(
var
j
=
0
;
j
<
len
;
j
++
)
{
for
(
var
k
=
0
;
k
<
len2
;
k
++
)
{
...
...
@@ -308,7 +305,7 @@ define(function (require) {
chordShape
.
style
.
opacity
=
(
i
===
idx
||
j
===
idx
)
?
0.5
:
0.03
;
self
.
zr
.
modShape
(
chordShape
.
id
,
chordShape
);
self
.
zr
.
modShape
(
chordShape
.
id
);
}
}
}
...
...
@@ -326,14 +323,14 @@ define(function (require) {
timeout
=
setTimeout
(
function
(){
for
(
var
i
=
0
;
i
<
len
;
i
++
)
{
self
.
sectorShapes
[
i
].
style
.
opacity
=
1.0
;
self
.
zr
.
modShape
(
self
.
sectorShapes
[
i
].
id
,
self
.
sectorShapes
[
i
]
);
self
.
zr
.
modShape
(
self
.
sectorShapes
[
i
].
id
);
for
(
var
j
=
0
;
j
<
len
;
j
++
)
{
for
(
var
k
=
0
;
k
<
len2
;
k
++
)
{
var
chordShape
=
self
.
chordShapes
[
i
][
j
][
k
];
if
(
chordShape
)
{
chordShape
.
style
.
opacity
=
0.5
;
self
.
zr
.
modShape
(
chordShape
.
id
,
chordShape
);
self
.
zr
.
modShape
(
chordShape
.
id
);
}
}
}
...
...
src/chart/force.js
浏览文件 @
409bdca2
...
...
@@ -689,25 +689,25 @@ define(function (require) {
_update
(
stepTime
);
_updateLinkShapes
();
var
tmp
=
{};
//
var tmp = {};
for
(
var
i
=
0
;
i
<
nodeShapes
.
length
;
i
++
)
{
var
shape
=
nodeShapes
[
i
];
tmp
.
position
=
shape
.
position
;
zr
.
modShape
(
shape
.
id
,
tmp
,
true
);
//
var shape = nodeShapes[i];
//
tmp.position = shape.position;
zr
.
modShape
(
nodeShapes
[
i
].
id
);
}
tmp
=
{};
//
tmp = {};
for
(
var
i
=
0
;
i
<
linkShapes
.
length
;
i
++
)
{
var
shape
=
linkShapes
[
i
];
tmp
.
style
=
shape
.
style
;
zr
.
modShape
(
shape
.
id
,
tmp
,
true
);
//
var shape = linkShapes[i];
//
tmp.style = shape.style;
zr
.
modShape
(
linkShapes
[
i
].
id
);
}
tmp
=
{};
//
tmp = {};
for
(
var
i
=
0
;
i
<
arrowShapes
.
length
;
i
++
)
{
var
shape
=
arrowShapes
[
i
];
tmp
.
position
=
shape
.
position
;
tmp
.
rotation
=
shape
.
rotation
;
zr
.
modShape
(
shape
.
id
,
tmp
,
true
);
//
var shape = arrowShapes[i];
//
tmp.position = shape.position;
//
tmp.rotation = shape.rotation;
zr
.
modShape
(
arrowShapes
[
i
].
id
);
}
zr
.
refresh
();
...
...
src/chart/island.js
浏览文件 @
409bdca2
...
...
@@ -62,7 +62,7 @@ define(function (require) {
ecData
.
set
(
shape
,
'
value
'
,
value
);
ecData
.
set
(
shape
,
'
name
'
,
name
);
self
.
zr
.
modShape
(
shape
.
id
,
shape
);
self
.
zr
.
modShape
(
shape
.
id
);
self
.
zr
.
refresh
();
zrEvent
.
stop
(
event
);
};
...
...
@@ -209,7 +209,7 @@ define(function (require) {
var
dragged
=
param
.
dragged
;
// 当前被拖拽的图形对象
_combine
(
target
,
dragged
);
this
.
zr
.
modShape
(
target
.
id
,
target
);
this
.
zr
.
modShape
(
target
.
id
);
status
.
dragIn
=
true
;
...
...
src/chart/map.js
浏览文件 @
409bdca2
...
...
@@ -216,7 +216,6 @@ define(function (require) {
);
self
.
_buildMark
(
mt
,
ms
);
if
(
--
self
.
_mapDataRequireCounter
<=
0
)
{
self
.
_shapeListMap
=
{};
for
(
var
i
=
0
,
l
=
self
.
shapeList
.
length
;
i
<
l
;
i
++
)
{
self
.
zr
.
addShape
(
self
.
shapeList
[
i
]);
}
...
...
@@ -1032,7 +1031,7 @@ define(function (require) {
for
(
var
i
=
0
,
l
=
this
.
shapeList
.
length
;
i
<
l
;
i
++
)
{
if
(
this
.
shapeList
[
i
].
_mapType
==
this
.
_curMapType
)
{
this
.
shapeList
[
i
].
position
=
position
;
this
.
zr
.
modShape
(
this
.
shapeList
[
i
].
id
,
mod
,
true
);
this
.
zr
.
modShape
(
this
.
shapeList
[
i
].
id
);
}
}
...
...
@@ -1085,9 +1084,7 @@ define(function (require) {
if
(
this
.
shapeList
[
i
].
style
.
_text
==
p
)
{
this
.
shapeList
[
i
].
style
=
this
.
shapeList
[
i
].
_style
;
this
.
zr
.
modShape
(
this
.
shapeList
[
i
].
id
,
this
.
shapeList
[
i
]
);
this
.
zr
.
modShape
(
this
.
shapeList
[
i
].
id
);
}
}
p
!=
name
&&
(
this
.
_selected
[
p
]
=
false
);
...
...
@@ -1108,10 +1105,7 @@ define(function (require) {
else
{
this
.
shapeList
[
i
].
style
=
this
.
shapeList
[
i
].
_style
;
}
this
.
zr
.
modShape
(
this
.
shapeList
[
i
].
id
,
{
style
:
this
.
shapeList
[
i
].
style
}
);
this
.
zr
.
modShape
(
this
.
shapeList
[
i
].
id
);
}
}
...
...
@@ -1140,7 +1134,6 @@ define(function (require) {
this
.
_selected
=
{};
// 地图选择状态
this
.
_mapTypeMap
=
{};
// 图例类型索引
this
.
_mapDataMap
=
{};
// 根据地图类型索引bbox,transform,path
this
.
_shapeListMap
=
{};
// 名字到shapeList关联映射
this
.
_nameMap
=
{};
// 个性化地名
this
.
_specialArea
=
{};
// 特殊
this
.
_refreshDelayTicket
;
// 滚轮缩放时让refresh飞一会
...
...
src/component/dataRange.js
浏览文件 @
409bdca2
...
...
@@ -973,7 +973,7 @@ define(function (require) {
this
.
_fillerShae
.
style
.
height
=
height
*
(
this
.
_range
.
start
-
this
.
_range
.
end
)
/
100
;
}
this
.
zr
.
modShape
(
this
.
_fillerShae
.
id
,
this
.
_fillerShae
);
this
.
zr
.
modShape
(
this
.
_fillerShae
.
id
);
this
.
_syncHandleShape
();
}
}
...
...
@@ -1096,7 +1096,7 @@ define(function (require) {
this
.
_gap
*
this
.
_range
.
start
+
this
.
dataRangeOption
.
min
);
this
.
zr
.
modShape
(
this
.
_startShape
.
id
,
this
.
_startShape
);
this
.
zr
.
modShape
(
this
.
_startShape
.
id
);
this
.
_endShape
.
position
=
[
this
.
_endShape
.
style
.
x
-
this
.
_endShape
.
style
.
_x
,
this
.
_endShape
.
style
.
y
-
this
.
_endShape
.
style
.
_y
...
...
@@ -1114,12 +1114,12 @@ define(function (require) {
this
.
_endShape
.
style
.
color
=
this
.
_endShape
.
highlightStyle
.
strokeColor
=
this
.
getColor
(
this
.
_gap
*
this
.
_range
.
end
+
this
.
dataRangeOption
.
min
);
this
.
zr
.
modShape
(
this
.
_endShape
.
id
,
this
.
_endShape
);
this
.
zr
.
modShape
(
this
.
_endShape
.
id
);
this
.
zr
.
modShape
(
this
.
_startMask
.
id
,
this
.
_startMask
);
this
.
zr
.
modShape
(
this
.
_endMask
.
id
,
this
.
_endMask
);
this
.
zr
.
modShape
(
this
.
_startMask
.
id
);
this
.
zr
.
modShape
(
this
.
_endMask
.
id
);
needFiller
&&
this
.
zr
.
modShape
(
this
.
_fillerShae
.
id
,
this
.
_fillerShae
);
needFiller
&&
this
.
zr
.
modShape
(
this
.
_fillerShae
.
id
);
this
.
zr
.
refresh
();
},
...
...
src/component/dataZoom.js
浏览文件 @
409bdca2
...
...
@@ -584,8 +584,8 @@ define(function (require) {
);
}
this
.
zr
.
modShape
(
this
.
_startShape
.
id
,
this
.
_startShape
);
this
.
zr
.
modShape
(
this
.
_endShape
.
id
,
this
.
_endShape
);
this
.
zr
.
modShape
(
this
.
_startShape
.
id
);
this
.
zr
.
modShape
(
this
.
_endShape
.
id
);
// 同步边框
this
.
_syncFrameShape
();
...
...
@@ -625,7 +625,7 @@ define(function (require) {
);
}
this
.
zr
.
modShape
(
this
.
_fillerShae
.
id
,
this
.
_fillerShae
);
this
.
zr
.
modShape
(
this
.
_fillerShae
.
id
);
// 同步边框
this
.
_syncFrameShape
();
...
...
@@ -651,8 +651,8 @@ define(function (require) {
this
.
_location
.
y
+
this
.
_location
.
height
-
this
.
_endFrameShape
.
style
.
y
;
}
this
.
zr
.
modShape
(
this
.
_startFrameShape
.
id
,
this
.
_startFrameShape
);
this
.
zr
.
modShape
(
this
.
_endFrameShape
.
id
,
this
.
_endFrameShape
);
this
.
zr
.
modShape
(
this
.
_startFrameShape
.
id
);
this
.
zr
.
modShape
(
this
.
_endFrameShape
.
id
);
},
_syncShape
:
function
()
{
...
...
@@ -685,9 +685,9 @@ define(function (require) {
-
this
.
_handleSize
;
}
this
.
zr
.
modShape
(
this
.
_startShape
.
id
,
this
.
_startShape
);
this
.
zr
.
modShape
(
this
.
_endShape
.
id
,
this
.
_endShape
);
this
.
zr
.
modShape
(
this
.
_fillerShae
.
id
,
this
.
_fillerShae
);
this
.
zr
.
modShape
(
this
.
_startShape
.
id
);
this
.
zr
.
modShape
(
this
.
_endShape
.
id
);
this
.
zr
.
modShape
(
this
.
_fillerShae
.
id
);
// 同步边框
this
.
_syncFrameShape
();
this
.
zr
.
refresh
();
...
...
src/component/tooltip.js
浏览文件 @
409bdca2
...
...
@@ -177,12 +177,12 @@ define(function (require) {
var
needRefresh
=
false
;
if
(
!
this
.
_axisLineShape
.
invisible
)
{
this
.
_axisLineShape
.
invisible
=
true
;
this
.
zr
.
modShape
(
this
.
_axisLineShape
.
id
,
this
.
_axisLineShape
);
this
.
zr
.
modShape
(
this
.
_axisLineShape
.
id
);
needRefresh
=
true
;
}
if
(
!
this
.
_axisShadowShape
.
invisible
)
{
this
.
_axisShadowShape
.
invisible
=
true
;
this
.
zr
.
modShape
(
this
.
_axisShadowShape
.
id
,
this
.
_axisShadowShape
);
this
.
zr
.
modShape
(
this
.
_axisShadowShape
.
id
);
needRefresh
=
true
;
}
if
(
this
.
_lastTipShape
&&
this
.
_lastTipShape
.
tipShape
.
length
>
0
)
{
...
...
@@ -948,7 +948,7 @@ define(function (require) {
if
(
!
this
.
_axisLineShape
.
invisible
)
{
this
.
_axisLineShape
.
invisible
=
true
;
this
.
zr
.
modShape
(
this
.
_axisLineShape
.
id
,
this
.
_axisLineShape
);
this
.
zr
.
modShape
(
this
.
_axisLineShape
.
id
);
this
.
zr
.
refresh
();
}
...
...
@@ -1035,7 +1035,7 @@ define(function (require) {
lineType
:
lineType
};
this
.
_axisLineShape
.
invisible
=
false
;
this
.
zr
.
modShape
(
this
.
_axisLineShape
.
id
,
this
.
_axisLineShape
);
this
.
zr
.
modShape
(
this
.
_axisLineShape
.
id
);
}
else
if
(
pointType
==
'
shadow
'
)
{
if
(
typeof
areaSize
==
'
undefined
'
...
...
@@ -1082,7 +1082,7 @@ define(function (require) {
lineWidth
:
lineWidth
};
this
.
_axisShadowShape
.
invisible
=
false
;
this
.
zr
.
modShape
(
this
.
_axisShadowShape
.
id
,
this
.
_axisShadowShape
);
this
.
zr
.
modShape
(
this
.
_axisShadowShape
.
id
);
}
this
.
zr
.
refresh
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录