Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Drag element, event onDragStart #6734

Open
2 of 10 tasks
WolfVerrron18 opened this issue Jan 16, 2025 · 1 comment
Open
2 of 10 tasks

[Bug]: Drag element, event onDragStart #6734

WolfVerrron18 opened this issue Jan 16, 2025 · 1 comment
Labels
status: waiting for maintainer These issues have not yet been reviewed by a maintainer

Comments

@WolfVerrron18
Copy link

Describe the bug / 问题描述

Incorrect processing of the FrontElement graph function, when capturing a combo, it does not take into account the fact that the nodes lying in it may contain edges from the outside

image

From the function getSubgraphRelatedEdges only the array of internal is taken, not taking into account the external, because of which visually edges that stretch from other nodes to combo nodes visually go to the buildings of the background

Reproduction link / 复现链接

https://stackblitz.com/edit/vitejs-vite-c142bq89?file=src%2FApp.vue

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

Trigger the onDragStart event on the combo and you will see how edge nodes stretching to nodes inside the combo get a smaller zIndex and fade into the background

G6 Version / G6 版本

🆕 5.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他
@WolfVerrron18 WolfVerrron18 added the status: waiting for maintainer These issues have not yet been reviewed by a maintainer label Jan 16, 2025
Copy link

The issue you've described seems to be related to the handling of edges in a combo when using the onDragStart event in G6 version 5.x. Specifically, the problem arises because the function getSubgraphRelatedEdges only considers internal edges and not external ones, causing visual discrepancies where edges from outside nodes to combo nodes appear to fade into the background.

To address this issue, you might need to modify the logic in the getSubgraphRelatedEdges function to include external edges as well. This would ensure that all relevant edges are considered during the drag event, maintaining the correct visual hierarchy.

If you need further assistance or a more detailed solution, please let me know, and I can help guide you through the process of modifying the code or suggest alternative approaches.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for maintainer These issues have not yet been reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant