antvis/G6

TreeGraph使用changeData改变数据后,触发了图上绑定的事件报错 #5199

augustaba posted onGitHub

问题描述

当我试图拖拽一个节点到树图的另一个节点下时,使用changeData改变了数据后。由于我节点上绑定了鼠标mouseleave等事件,当触发了mouseleave里的updateItem方法,报错了,有什么解法吗?

重现链接

https://codesandbox.io/p/sandbox/g6-test-yts46l?file=%2Fsrc%2FApp.tsx%3A71%2C22

重现步骤

  1. 在codesanbox中预览页面
  2. 直接在画布中拖拽任一节点
  3. 鼠标移动几下
  4. 报错了

预期行为

期望有什么办法可以不报错

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]
  • G6 版本: [4.5.1 ... ]

屏幕截图或视频(可选)

image

补充说明(可选)

No response


hi @augustaba, welcome!

posted by github-actions[bot] over 1 year ago

Hi @augustaba, Please star this repo if you find it useful! Thanks :star:! 你好 @augustaba。如果该仓库对你有用,可以 star 一下,感谢你的 :star:!

posted by github-actions[bot] over 1 year 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