提交 4ec7a068 编写于 作者: K kener

不支持Canvas的浏览器中强制关闭所有动画和实时变化

上级 944ba8a4
......@@ -1333,6 +1333,10 @@ define(function (require) {
this.option.dataRange.padding
);
this.dataRangeOption = this.option.dataRange;
if (!this.myChart.canvasSupported) {
// 不支持Canvas的强制关闭实时动画
this.dataRangeOption.realtime = false;
}
var splitNumber = this.dataRangeOption.splitNumber <= 0
|| this.dataRangeOption.calculable
......
......@@ -49,6 +49,10 @@ define(function (require) {
this.option.dataZoom = this.reformOption(this.option.dataZoom);
this.zoomOption = this.option.dataZoom;
if (!this.myChart.canvasSupported) {
// 不支持Canvas的强制关闭实时动画
this.zoomOption.realtime = false;
}
// 位置参数,通过计算所得x, y, width, height
this._location = this._getLocation();
......@@ -1138,6 +1142,10 @@ define(function (require) {
this.option = magicOption;
this.option.dataZoom = this.reformOption(this.option.dataZoom);
this.zoomOption = this.option.dataZoom;
if (!this.myChart.canvasSupported) {
// 不支持Canvas的强制关闭实时动画
this.zoomOption.realtime = false;
}
this.clear();
// 位置参数,通过计算所得x, y, width, height
......
......@@ -792,6 +792,10 @@ define(function (require) {
this.timelineOption.checkpointStyle.label.textStyle || {},
this.ecTheme.textStyle
);
if (!this.myChart.canvasSupported) {
// 不支持Canvas的强制关闭实时动画
this.timelineOption.realtime = false;
}
if (this.timelineOption.show && needRefresh) {
this.clear();
......
......@@ -62,6 +62,7 @@ define(function (require) {
}
_instances[key] = new Echarts(dom);
_instances[key].id = key;
_instances[key].canvasSupported = _canvasSupported;
_instances[key].setTheme(theme);
return _instances[key];
......@@ -869,7 +870,13 @@ define(function (require) {
if (!(themeColor && themeColor.length)) {
themeColor = this._themeConfig.color;
}
if (!_canvasSupported) {
// 不支持Canvas的强制关闭动画
magicOption.animation = false;
magicOption.addDataAnimation = false;
}
this._zr.getColor = function (idx) {
var zrColor = require('zrender/tool/color');
return zrColor.getColor(idx, themeColor);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册