提交 53086b14 编写于 作者: P pah100

Merge branch 'master' of https://github.com/ecomfe/echarts

......@@ -66,7 +66,12 @@ define(function (require) {
var color = effectModel.get('color') || lineData.getItemVisual(idx, 'color');
var symbol = this.childAt(1);
var period = effectModel.get('period') * 1000;
if (this._symbolType !== symbolType || period !== this._period) {
var loop = effectModel.get('loop');
if (
this._symbolType !== symbolType
|| period !== this._period
|| loop !== this._loop
) {
symbol = symbolUtil.createSymbol(
symbolType, -0.5, -0.5, 1, 1, color
);
......@@ -74,17 +79,24 @@ define(function (require) {
symbol.z2 = 100;
this._symbolType = symbolType;
this._period = period;
this._loop = loop;
this.add(symbol);
symbol.__t = 0;
symbol.animate('', true)
var animator = symbol.animate('', loop)
.when(period, {
__t: 1
})
.delay(idx / lineData.count() * period / 2)
.during(zrUtil.bind(updateSymbolPosition, symbol))
.start();
.during(zrUtil.bind(updateSymbolPosition, symbol));
if (!loop) {
var self = this;
animator.done(function () {
self.remove(symbol);
});
}
animator.start();
}
// Shadow color is same with color in default
symbol.setStyle('shadowColor', color);
......
......@@ -85,6 +85,7 @@ define(function (require) {
period: 4,
symbol: 'circle',
symbolSize: 3,
loop: true,
// Length of trail, 0 - 1
trailLength: 0.2
// Same with lineStyle.normal.color
......
......@@ -182,6 +182,10 @@ define(function (require) {
var map = geoCreator.getMap(mapName);
var geoJson = map && map.geoJson;
if (!geoJson) {
console.error('Map ' + mapName + ' not exists');
return originRegionArr;
}
var dataNameMap = {};
var features = geoJson.features;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册