提交 7921d86a 编写于 作者: L lang

Remove animation can be disabled

上级 ff93e3e7
......@@ -28,7 +28,6 @@ define(function (require) {
var cartesian = seriesModel.coordinateSystem;
var baseAxis = cartesian.getBaseAxis();
var isInverse = cartesian.getOtherAxis(baseAxis).inverse;
var isHorizontal = baseAxis.isHorizontal();
var enableAnimation = ecModel.get('animation');
......@@ -126,21 +125,26 @@ define(function (require) {
this._data = data;
},
remove: function () {
if (this._data) {
var group = this.group;
this._data.eachItemGraphicEl(function (el) {
// Not show text when animating
el.style.text = '';
el.animateTo({
shape: {
width: 0
}
}, 300, 'cubicOut',
function () {
group.remove(el);
remove: function (ecModel) {
var group = this.group;
if (ecModel.get('animation')) {
if (this._data) {
this._data.eachItemGraphicEl(function (el) {
// Not show text when animating
el.style.text = '';
el.animateTo({
shape: {
width: 0
}
}, 300, 'cubicOut',
function () {
group.remove(el);
});
});
});
}
}
else {
group.removeAll();
}
}
});
......
......@@ -397,11 +397,11 @@ define(function(require) {
return clipPath;
},
remove: function () {
remove: function (ecModel) {
var group = this.group;
group.remove(this._polyline);
group.remove(this._polygon);
this._dataSymbol.remove(true);
this._dataSymbol.remove(ecModel.get('animation'));
}
});
});
\ No newline at end of file
......@@ -17,8 +17,8 @@ define(function (require) {
);
},
remove: function () {
this._dataSymbol.remove(true);
remove: function (ecModel) {
this._dataSymbol.remove(ecModel.get('animation'));
}
});
});
\ No newline at end of file
......@@ -423,7 +423,7 @@ define(function (require) {
// Remove groups of charts
zrUtil.each(this._chartsList, function (chart) {
if (!chart.__keepAlive) {
chart.remove();
chart.remove(ecModel, api);
}
}, this);
},
......
......@@ -26,7 +26,7 @@ define(function (require) {
render: function (seriesModel, ecModel, api) {},
remove: function () {
remove: function (ecModel, api) {
this.group.removeAll();
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册