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

G6-4.8.23 在自定义布局execute()内更改Node节点的Style未立即生效问题 #5294

Closed
x-zhao-res opened this issue Dec 25, 2023 · 3 comments
Labels
good first issue Outdate This issue is too old to be resolved stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed

Comments

@x-zhao-res
Copy link

G6 版本

5.x

问题描述

版本: G6-4.8.23
在自定义布局的execute()内,更改节点Style不生效,是否是因为自定义layout生命周期的问题导致的?

重现链接

https://stackblitz.com/edit/vitejs-vite-kzfulb?file=src%2Fgloballayout.js

重现步骤

操作:
1.设置自定义布局,循环将节点的style.fill设置为red
2.配置节点点击回调,设置点击后将节点激活为click状态,这个应该是默认的
现象:
自定义布局结束后,未看到style改变,但是点击节点激活为click之后可以看到颜色更新,推测应该是layout布局结束后只refresh了x y属性,其他属性需要下次时才能refresh

预期行为

自定义布局内改变节点的style后,布局结束后直接更新节点,而不是需要点击一下

平台

  • 操作系统: [macOS]
  • 网页浏览器: [Google Chrome]
  • G6 版本: [4.5.1 ... ]

屏幕截图或视频(可选)

补充说明(可选)

Copy link

hi @x-zhao-res, welcome!

Copy link

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

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Apr 17, 2024
@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
good first issue Outdate This issue is too old to be resolved stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed
Projects
None yet
Development

No branches or pull requests

2 participants