antvis/G6

存在combo时,edge图层为什么会在node之上呢 #4738

zhang-yanglong posted onGitHub

Describe the bug

graph配置中开启linkCenter 在有combo的情况下,edge线条的图层在node节点(节点不在combo中)之下 而没有combo的情况下,edge线条的的图层却在node节点(节点不在combo中)之上 按教程中Group处说的,https://antv-g6.gitee.io/zh/docs/manual/middle/elements/shape/graphics-group nodeGroup图层应该保持比edgeGroup图层更高才对

Your Example Website or App

https://g6.antv.antgroup.com/examples/item/defaultCombos/#rect

Steps to Reproduce the Bug or Issue

import G6 from '@antv/g6';

const data = { nodes: [ { id: 'node1', size: 40, }, { id: 'node2', size: 40, }, ], combos: [ { id: 'combo', label: 'Combo', }, ], edges: [ { source: 'node1', target: 'node2', }, ] };

const width = document.getElementById('container').scrollWidth; const height = document.getElementById('container').scrollHeight || 500; const graph = new G6.Graph({ container: 'container', width, height, fitCenter: true, groupByTypes: false, modes: { default: ['drag-canvas', 'drag-node', 'drag-combo'], }, linkCenter: true, });

graph.data(data); graph.render();

Expected behavior

image image

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response


节点配置comboId下看看呢

posted by GemT27 almost 2 years ago

遇到同样的问题,未解决! 动画 https://codesandbox.io/s/bold-sun-49z5tw?file=/index.js

posted by youbins almost 2 years ago

使用combo布局,combo 图上节点、边、combo 的层级符合常规逻辑,需要将 groupByTypes 设置为 false。导致节点的nodeGroup 和边的 edgeGroup 不存在。所有节点和边在同一个分组,它们的层级根据生成的顺序决定。 参考:节点与边的层级

posted by MusicTen 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