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

tooltip数据更新会消失 #4981

Closed
489273558 opened this issue Sep 18, 2023 · 10 comments
Closed

tooltip数据更新会消失 #4981

489273558 opened this issue Sep 18, 2023 · 10 comments
Labels
Outdate This issue is too old to be resolved

Comments

@489273558
Copy link

问题描述

鼠标悬停在节点上,出现Tooltips,当节点调用update后,tooltip隐藏,并且移出移入(不移入到其他节点上面)不会出现

重现链接

重现步骤

1.进入页面
2.界面初始化节点
3.鼠标移入节点,tooltips显示
5.websocket推送数据更新节点(调用节点的update方法或者graph的update,updateItem方法)
6.tooltip消失,并且移出节点后再移入也不会显示(移入其他节点后再移入当前节点正常显示)

预期行为

期望:
调用update时tooltips正常显示,并且更新View
实际:
调用update方法tooltips消失并且移出节点后再移入也不会显示,移入其他节点后再移入当前节点正常显示

平台

  • 操作系统: Windows11
  • 网页浏览器: electron内置webview
  • G6 版本: 4.8.21

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@Yanyan-Wang
Copy link
Contributor

给个在线复现的 demo 吧

@489273558
Copy link
Author

@Yanyan-Wang
Copy link
Contributor

简单看了下,好像不是节点更新导致的,而是 newEdges 的增删导致的

@489273558
Copy link
Author

好的,麻烦了

@489273558 489273558 reopened this Sep 19, 2023
@489273558 489273558 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2023
@489273558 489273558 reopened this Sep 19, 2023
@489273558
Copy link
Author

demo已修改,但是出现了两个问题
1.节点数据更新后tooltips没有重新渲染,需要移动鼠标才会更新数据
2.移出节点后tooltips不消失,需要监听node:mouseout事件来实现
期望:
1.调用元素的update后会重新渲染tooltips
2.移出节点后tooltips自动消失,不需要监听node:mouseout事件来实现

@Yanyan-Wang
Copy link
Contributor

demo 点开好像没改变,可能修改了没保存?但是我基于你这个 demo,基本把所有东西都注释了,只剩下 graph 和 tooltip ,还是有这个问题:https://stackblitz.com/edit/vitejs-vite-wz2ztt?file=src%2FApp.vue,src%2Fcomponents%2FG6View.vue,src%2Futils.ts,src%2Fstyle.css

而官网跳出来无框架的 demo 没这个问题:https://codesandbox.io/s/loving-moser-ld7q6d

react 应该也没有问题。人麻了我对 vue 不熟,不知道原因了,看看有没有对 vue 了解的小伙伴。

@AntarcticPresident
Copy link

我也遇到了。
不过我是把原来的destroy掉,又重新建了一个对象。图能画出来,但是tooltip没有了。

@5j2f
Copy link

5j2f commented Dec 11, 2023

简单看了下,好像不是节点更新导致的,而是 newEdges 的增删导致的

我也遇到了 确实是删除线会导致node消失,改怎么解决呢

@q269384828
Copy link

我也遇到了。 不过我是把原来的destroy掉,又重新建了一个对象。图能画出来,但是tooltip没有了。

确实,这个是通病

@Aarebecca Aarebecca added the Outdate This issue is too old to be resolved label Jul 5, 2024
Copy link

github-actions bot commented Jul 5, 2024

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。

@github-actions github-actions bot closed this as completed Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Outdate This issue is too old to be resolved
Projects
None yet
Development

No branches or pull requests

6 participants