combo展开时,设置toFront不生效 #4534
mugo1993-ss posted onGitHub
问题描述
1.根据组合式布局,让所有combo收起渲染,设置groupByTypes: true
2.展开depth低的combo,并且设置toFront,其他的combo还是展示在展开的combo上了
重现链接
无
重现步骤
groupByTypes: true, layout: { type: 'comboCombined', spacing: 20, outerLayout: new G6.Layout['dagre']({ // center: [width / 2, height / 2], // linkDistance: 50, // nodeStrength: 50, // edgeStrength: 0.1, rankdir: 'LR', // 可选,默认为图的中心 align: 'DL', // 可选 nodesep: -100, // 可选 ranksep: -100, // 可选 nodesepFunc: (d) => { if (d.isbreakCombo) { return 10 } else { return -150 } }, }), },
state.graph.on('beforecollapseexpandcombo ', (action, combo) => { if (action === 'expand') { combo.toFront() }
state.graph.refresh()
})
预期行为
希望展开的combo在最顶层
平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]
- G6 版本: [4.5.1 ... ]
屏幕截图或视频(可选)
No response
补充说明(可选)
No response