提交 a39be730 编写于 作者: K kener

toolbox支持自定义image icon

上级 5fa685d3
......@@ -169,6 +169,14 @@ define(function (require) {
clickable : true
};
if (toolboxOption.featureImageIcon[_iconList[i]]) {
itemShape.style.image =
toolboxOption.featureImageIcon[_iconList[i]];
itemShape.style.opacity = 0.8;
itemShape.highlightStyle.opacity = 1;
itemShape.shape = 'image';
}
if (toolboxOption.orient == 'horizontal') {
// 修正左对齐第一个或右对齐最后一个
if (i === 0 && textAlign == 'left') {
......@@ -618,23 +626,45 @@ define(function (require) {
}
function _iconDisable(target) {
zr.modShape(target.id, {
hoverable : false,
clickable : false,
style : {
strokeColor : _disableColor
}
});
if (target.shape != 'image') {
zr.modShape(target.id, {
hoverable : false,
clickable : false,
style : {
strokeColor : _disableColor
}
});
}
else {
zr.modShape(target.id, {
hoverable : false,
clickable : false,
style : {
opacity : 0.3
}
});
}
}
function _iconEnable(target) {
zr.modShape(target.id, {
hoverable : true,
clickable : true,
style : {
strokeColor : target.highlightStyle.strokeColor
}
});
if (target.shape != 'image') {
zr.modShape(target.id, {
hoverable : true,
clickable : true,
style : {
strokeColor : target.highlightStyle.strokeColor
}
});
}
else {
zr.modShape(target.id, {
hoverable : true,
clickable : true,
style : {
opacity : 0.8
}
});
}
}
function _onDataView() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册