antvis/G6

Do you want to work on this issue?

You can request for a bounty in order to promote it!

[Bug]: #6725

sunzlit posted onGitHub

Describe the bug / 问题描述

当同时设置了'drag-canvas'和'collapse-expand'时,先收起节点,然后多次拖动位置后就无法再次展开节点了。官网案例中也是如此。如何同时又设置了{ type: 'click-select' },出现无法展开的概率会更大。 当前版本:"@antv/g6": "^5.0.42", "vue": "^3.3.4"

https://g6.antv.antgroup.com/examples/layout/compact-box/#basic

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

1.点击收起节点 2.多次拖动收起的节点位置 3.再次点击节点展开 4.重复此操作

G6 Version / G6 版本

🆕 5.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

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

目前在 GitHub 上没有找到与您描述的完全相同的问题报告。这个问题可能是一个新的问题。

为了更好地解决这个问题,您可以尝试以下步骤:

  1. 确保您使用的是最新版本的 G6。
  2. 检查您的代码中是否有任何自定义的事件处理逻辑,可能会影响节点的展开和拖动功能。
  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

https://g6.antv.antgroup.com/examples/layout/compact-box/#basic 中的 behaviors 一行改为:

      behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element', 'collapse-expand'],
      animation: { duration: 5000 },

在收起节点动画未结束时拖动节点即可复现。同时,graph.isCollapsingExpanding 一直都是 true,不会再变回 false,导致无法展开或收起任何节点。

posted by Crystal-RainSlide 2 months ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests