antvis/G6

[Bug]: After using hover-activate, dragging a node will cause the edge display to take precedence over the node #6743

littlebuding posted onGitHub

Describe the bug / 问题描述

"@antv/g6": "^5.0.42",使用hover-activate后,拖拽节点会导致边展示的优先级高于节点

Image

No response

Steps to Reproduce the Bug or Issue / 重现步骤

No response

G6 Version / G6 版本

🆕 5.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他

您提到在使用 "@antv/g6": "^5.0.42" 时,启用 hover-activate 后,拖拽节点会导致边的展示优先级高于节点。这个问题可能与图形渲染的层级顺序有关。

为了帮助您解决这个问题,请您尝试以下步骤:

  1. 检查节点和边的层级设置:确保节点的层级(z-index)高于边的层级。您可以通过设置 zIndex 属性来调整。

  2. 更新到最新版本:确保您使用的是 G6 的最新版本,因为新版本可能已经修复了此问题。

  3. 自定义渲染顺序:如果默认的渲染顺序不符合您的需求,您可以通过自定义渲染逻辑来确保节点在边之上。

如果这些方法没有解决您的问题,您可以提供一个最小可复现的代码示例,以便更好地帮助您分析和解决问题。

如果您同意,我可以为您在 GitHub 上创建一个问题,以便开发团队进一步调查。请告诉我您的决定。

<details> <summary>🪧 Tips</summary> For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me. </details>

posted by petercat-assistant[bot] 3 months ago

在node和edge设置zIndex可以解决层级问题

posted by littlebuding 3 months ago

Fund this Issue

$0.00
Funded

Pull requests