antvis/G6

combo展开时,设置toFront不生效 #4534

mugo1993-ss posted onGitHub

问题描述

1.根据组合式布局,让所有combo收起渲染,设置groupByTypes: true 2.展开depth低的combo,并且设置toFront,其他的combo还是展示在展开的combo上了 image image

重现链接

重现步骤

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


在 aftercollapseexpandcombo 里 toFront 能否生效?因为 G6 需要控制 combo、节点、边的层级,才能让子节点/边看起来在对应的父 combo 中,所以内部会有 sort 的逻辑

posted by Yanyan-Wang almost 2 years ago

也不生效的,试过了

posted by mugo1993-ss almost 2 years ago

能不能分享下最新的群二维码啊 想进群交流一下

posted by mugo1993-ss almost 2 years ago

This issue has been closed because it has been outdate for a long time. Please open a new issue if you still need help.

这个 issue 已经被关闭,因为 它已经过期很久了。 如果你仍然需要帮助,请创建一个新的 issue。

posted by github-actions[bot] 10 months ago

Fund this Issue

$0.00
Funded

Pull requests