提交 310223be 编写于 作者: K Kener

z & zlevel can be set by option

上级 bb9b4e81
......@@ -1080,6 +1080,8 @@ define(function (require) {
opt.itemStyle.normal.label.textStyle = this.getTextStyle(
opt.itemStyle.normal.label.textStyle
);
this.z = opt.z;
this.zlevel = opt.zlevel;
}
};
......
......@@ -874,7 +874,8 @@ define(function (require) {
opt.itemStyle.emphasis.label.textStyle = this.getTextStyle(
opt.itemStyle.emphasis.label.textStyle
);
this.z = opt.z;
this.zlevel = opt.zlevel;
return opt;
},
......
......@@ -55,6 +55,9 @@ define(function (require) {
Base.prototype = {
canvasSupported: require('zrender/tool/env').canvasSupported,
_getZ : function(zWhat) {
if (this[zWhat] != null) {
return this[zWhat];
}
var opt = this.ecTheme[this.type];
if (opt && opt[zWhat] != null) {
return opt[zWhat];
......@@ -88,13 +91,16 @@ define(function (require) {
*/
reformOption: function (opt) {
// 默认配置项动态多级合并,依赖加载的组件选项未被merge到ecTheme里,需要从config里取
return zrUtil.merge(
opt = zrUtil.merge(
zrUtil.merge(
opt || {},
zrUtil.clone(this.ecTheme[this.type] || {})
),
zrUtil.clone(ecConfig[this.type] || {})
);
this.z = opt.z;
this.zlevel = opt.zlevel;
return opt;
},
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册