提交 1e3b663b 编写于 作者: S sushuang

fix(graph): Fix that line label can not return to its original opacity after "focusNodeAdjacency".

上级 e0a70e6a
......@@ -49,7 +49,11 @@ function fadeOutItem(item, opacityPath, opacityRatio) {
el.downplay && el.downplay();
el.traverse(function (child) {
if (child.type !== 'group') {
child.setStyle('opacity', opacity);
var opct = child.lineLabelOriginalOpacity;
if (opct == null || opacityRatio != null) {
opct = opacity;
}
child.setStyle('opacity', opct);
}
});
}
......
......@@ -216,7 +216,11 @@ lineProto._createLine = function (lineData, idx, seriesScope) {
this.add(line);
var label = new graphic.Text({
name: 'label'
name: 'label',
// FIXME
// Temporary solution for `focusNodeAdjacency`.
// line label do not use the opacity of lineStyle.
lineLabelOriginalOpacity: 1
});
this.add(label);
......
......@@ -70,9 +70,6 @@ under the License.
}
}
},
lineStyle: {
width: 10
},
focusNodeAdjacency: focusNodeAdjacency,
data: [{
name: '节点1',
......@@ -92,7 +89,13 @@ under the License.
x: 550,
y: 500
}],
// links: [],
lineStyle: {
normal: {
width: 3,
color: '#184029',
curveness: 0
}
},
links: [{
source: 0,
target: 1,
......@@ -149,12 +152,7 @@ under the License.
}, {
source: '节点1',
target: '节点4'
}],
lineStyle: {
normal: {
curveness: 0
}
}
}]
}
]
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册