提交 9b2dc7c4 编写于 作者: 1 100pah

rename

上级 30dc4f7b
......@@ -150,8 +150,8 @@ define(function (require) {
this.option.center = center;
},
ifEnableAnimation: function () {
return GraphSeries.superCall(this, 'ifEnableAnimation')
isAnimationEnabled: function () {
return GraphSeries.superCall(this, 'isAnimationEnabled')
// Not enable animation when do force layout
&& !(this.get('layout') === 'force' && this.get('force.layoutAnimation'));
},
......
......@@ -259,7 +259,7 @@ define(function (require) {
graphic.setHoverStyle(symbolPath);
if (hoverAnimation && seriesModel.ifEnableAnimation()) {
if (hoverAnimation && seriesModel.isAnimationEnabled()) {
var onEmphasis = function() {
var ratio = size[1] / size[0];
this.animateTo({
......
......@@ -177,7 +177,7 @@ define(function (require) {
}, 300, 'elasticOut');
}
sector.off('mouseover').off('mouseout').off('emphasis').off('normal');
if (itemModel.get('hoverAnimation') && seriesModel.ifEnableAnimation()) {
if (itemModel.get('hoverAnimation') && seriesModel.isAnimationEnabled()) {
sector
.on('mouseover', onEmphasis)
.on('mouseout', onNormal)
......
......@@ -36,13 +36,13 @@ define(function (require) {
/**
* @return {boolean}
*/
ifEnableAnimation: function () {
isAnimationEnabled: function () {
if (env.node) {
return false;
}
var hostSeries = this.__hostSeries;
return this.getShallow('animation') && hostSeries && hostSeries.ifEnableAnimation();
return this.getShallow('animation') && hostSeries && hostSeries.isAnimationEnabled();
},
mergeOption: function (newOpt, ecModel, createdBySelf, isInit) {
......
......@@ -269,7 +269,7 @@ define(function(require) {
/**
* @return {boolean}
*/
ifEnableAnimation: function () {
isAnimationEnabled: function () {
if (env.node) {
return false;
}
......
......@@ -409,8 +409,8 @@ define(function(require) {
}
var animationEnabled = animatableModel
&& (
animatableModel.ifEnableAnimation
? animatableModel.ifEnableAnimation()
animatableModel.isAnimationEnabled
? animatableModel.isAnimationEnabled()
// Directly use animation property
: animatableModel.getShallow('animation')
);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册