Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
defffbe9
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,发现更多精彩内容 >>
提交
defffbe9
编写于
4月 10, 2020
作者:
P
pissang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(bmap): fix bmap style changed by the sdk and cause unexpected refresh bug.
上级
7887f27a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
5 deletion
+23
-5
extension-src/bmap/BMapView.js
extension-src/bmap/BMapView.js
+3
-2
src/chart/helper/LineDraw.js
src/chart/helper/LineDraw.js
+5
-1
test/lines-bus.html
test/lines-bus.html
+15
-2
未找到文件。
extension-src/bmap/BMapView.js
浏览文件 @
defffbe9
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
*/
*/
import
*
as
echarts
from
'
echarts
'
;
import
*
as
echarts
from
'
echarts
'
;
import
{
clone
}
from
'
zrender/src/core/util
'
;
export
default
echarts
.
extendComponentView
({
export
default
echarts
.
extendComponentView
({
type
:
'
bmap
'
,
type
:
'
bmap
'
,
...
@@ -96,7 +97,7 @@ export default echarts.extendComponentView({
...
@@ -96,7 +97,7 @@ export default echarts.extendComponentView({
if
(
JSON
.
stringify
(
originalStyle
)
!==
mapStyleStr
)
{
if
(
JSON
.
stringify
(
originalStyle
)
!==
mapStyleStr
)
{
// FIXME May have blank tile when dragging if setMapStyle
// FIXME May have blank tile when dragging if setMapStyle
if
(
Object
.
keys
(
newMapStyle
).
length
)
{
if
(
Object
.
keys
(
newMapStyle
).
length
)
{
bmap
.
setMapStyle
(
newMapStyle
);
bmap
.
setMapStyle
(
clone
(
newMapStyle
)
);
}
}
bMapModel
.
__mapStyle
=
JSON
.
parse
(
mapStyleStr
);
bMapModel
.
__mapStyle
=
JSON
.
parse
(
mapStyleStr
);
}
}
...
@@ -110,7 +111,7 @@ export default echarts.extendComponentView({
...
@@ -110,7 +111,7 @@ export default echarts.extendComponentView({
if
(
JSON
.
stringify
(
originalStyle2
)
!==
mapStyleStr2
)
{
if
(
JSON
.
stringify
(
originalStyle2
)
!==
mapStyleStr2
)
{
// FIXME May have blank tile when dragging if setMapStyle
// FIXME May have blank tile when dragging if setMapStyle
if
(
Object
.
keys
(
newMapStyle2
).
length
)
{
if
(
Object
.
keys
(
newMapStyle2
).
length
)
{
bmap
.
setMapStyleV2
(
newMapStyle2
);
bmap
.
setMapStyleV2
(
clone
(
newMapStyle2
)
);
}
}
bMapModel
.
__mapStyle2
=
JSON
.
parse
(
mapStyleStr2
);
bMapModel
.
__mapStyle2
=
JSON
.
parse
(
mapStyleStr2
);
}
}
...
...
src/chart/helper/LineDraw.js
浏览文件 @
defffbe9
...
@@ -123,9 +123,13 @@ lineDrawProto.incrementalPrepareUpdate = function (lineData) {
...
@@ -123,9 +123,13 @@ lineDrawProto.incrementalPrepareUpdate = function (lineData) {
this
.
group
.
removeAll
();
this
.
group
.
removeAll
();
};
};
function
isEffectObject
(
el
)
{
return
el
.
animators
&&
el
.
animators
.
length
>
0
;
}
lineDrawProto
.
incrementalUpdate
=
function
(
taskParams
,
lineData
)
{
lineDrawProto
.
incrementalUpdate
=
function
(
taskParams
,
lineData
)
{
function
updateIncrementalAndHover
(
el
)
{
function
updateIncrementalAndHover
(
el
)
{
if
(
!
el
.
isGroup
)
{
if
(
!
el
.
isGroup
&&
!
isEffectObject
(
el
)
)
{
el
.
incremental
=
el
.
useHoverLayer
=
true
;
el
.
incremental
=
el
.
useHoverLayer
=
true
;
}
}
}
}
...
...
test/lines-bus.html
浏览文件 @
defffbe9
...
@@ -24,7 +24,7 @@ under the License.
...
@@ -24,7 +24,7 @@ under the License.
<script
src=
'lib/esl.js'
></script>
<script
src=
'lib/esl.js'
></script>
<script
src=
'lib/config.js'
></script>
<script
src=
'lib/config.js'
></script>
<script
src=
'lib/jquery.min.js'
></script>
<script
src=
'lib/jquery.min.js'
></script>
<script
src=
'http://api.map.baidu.com/api?v=
2
.0&ak=KOmVjPVUAey1G2E8zNhPiuQ6QiEmAwZu'
></script>
<script
src=
'http://api.map.baidu.com/api?v=
3
.0&ak=KOmVjPVUAey1G2E8zNhPiuQ6QiEmAwZu'
></script>
<meta
name=
'viewport'
content=
'width=device-width, initial-scale=1'
/>
<meta
name=
'viewport'
content=
'width=device-width, initial-scale=1'
/>
</head>
</head>
<body>
<body>
...
@@ -34,8 +34,14 @@ under the License.
...
@@ -34,8 +34,14 @@ under the License.
height
:
100%
;
height
:
100%
;
margin
:
0
;
margin
:
0
;
}
}
#clear
{
position
:
absolute
;
left
:
10px
;
top
:
10px
;
}
</style>
</style>
<div
id=
'main'
></div>
<div
id=
'main'
></div>
<button
id=
'clear'
>
Clear
</button>
<script>
<script>
require
([
require
([
...
@@ -244,8 +250,15 @@ under the License.
...
@@ -244,8 +250,15 @@ under the License.
});
});
});
});
});
document
.
getElementById
(
'
clear
'
).
addEventListener
(
'
click
'
,
function
()
{
myChart
.
setOption
({
series
:
[{
data
:
[]
}]
});
});
});
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录