-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
question 💬This issue is just a question. It will be converted into discussion automaticallyThis issue is just a question. It will be converted into discussion automatically
Description
Describe the bug / 问题描述
problem
the edge key shows through a label text background, even with the default opacity of 1

expected
the edge key should be invisible behind the background (when opacity is 1)

this was the case in 4.x with the following config
defaultEdge: {
labelCfg: {
style: {
opacity: 0.8,
fill: "#111111",
background: {
fill: "#ffffff",
padding: [2, 2, 2, 2], // necessary for background
},
},
},
},
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
import { Graph } from '@antv/g6';
const data = {
nodes: [
{
id: 'node-1',
style: { x: 100, y: 150, labelText: 'Hover me!' },
},
{
id: 'node-2',
style: { x: 300, y: 150, labelText: 'Hover me!' },
},
],
edges: [{ source: 'node-1', target: 'node-2', style: { labelText: 'Hover me!' } }],
};
const graph = new Graph({
container: 'container',
data,
behaviors: ['drag-element'],
edge: {
style: {
labelBackgroundFill: "#ffffff",
labelPadding: [2, 2, 2, 2],
labelBackground: true,
labelBackgroundFillOpacity: 1,
}
},
behaviors: ["zoom-canvas", "drag-canvas"]
});
graph.render();
Version / 版本
🆕 5.x
OS / 操作系统
- macOS
- Windows
- Linux
- Others / 其他
Browser / 浏览器
- Chrome
- Edge
- Firefox
- Safari (Limited support / 有限支持)
- IE (Nonsupport / 不支持)
- Others / 其他
Metadata
Metadata
Assignees
Labels
question 💬This issue is just a question. It will be converted into discussion automaticallyThis issue is just a question. It will be converted into discussion automatically