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

给graph增加一个销毁画布的功能 #4290

Open
woshikay opened this issue May 7, 2024 · 4 comments
Open

给graph增加一个销毁画布的功能 #4290

woshikay opened this issue May 7, 2024 · 4 comments

Comments

@woshikay
Copy link

woshikay commented May 7, 2024

功能描述

需求:在调用X6进行绘制图形的时候,有时会需要销毁画布并重新生成一个画布
应用场景:在同一个组件中需要根据不同的配置创建不同的图形,如流程图,架构图,泳道图,ER图等等,每一个图形在新生成的时候都要加载自己不同的配置和方法,这个时候就需要把上一个实例化的graph销毁掉,然后重新new一个出来,在实际调用时发现官方并未提供该方法,所以导致必须将每一个都提前实例化出来,导致性能浪费,而且有很多效果无法实现!

期望解决方案

希望可以给graph增加一个destory()方法用于销毁掉之前实例化出来的graph

@x6-bot
Copy link
Contributor

x6-bot bot commented May 7, 2024

👋 @woshikay

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@ouyangtieniu
Copy link

this.graph.dispose(); 这个

@ouyangtieniu
Copy link

@zlecheng
Copy link

zlecheng commented May 15, 2024

踩坑文档:https://www.yuque.com/sxd_panda/antv/x6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants