We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
x6销毁的时候,能正常调用相关的钩子
自定义工具,进行事件绑定,但销毁的时候,未执行remove钩子
class MyButton extends Button { isListenerClick = false; clicKCallback: () => void; onRender() { super.onRender(); if (!this.isListenerClick) { this.clicKCallback = () => { let count = document.getElementById("count"); count.value = +count.value + 1; }; document.addEventListener("click", this.clicKCallback); this.isListenerClick = true; } } remove() { // dispose的时候不会调用 document.removeEventListener("click", this.clicKCallback); return super.remove(); } }
https://codesandbox.io/s/cranky-cloud-m7xxc?file=/src/app.tsx
在调用dispose前线调用this.graph.clearCells();,但除了节点外,不知道其他的功能(滚动、画布等)是否也正常destroy
dispose
this.graph.clearCells();
<!-- Provide a log message if relevant -->
The text was updated successfully, but these errors were encountered:
e211c1a
chore(release): @antv/x6@1.12.20 [skip ci]
24d4d8e
## @antv/x6 [1.12.20](https://github.com/antvis/x6/compare/@antv/x6@1.12.19...@antv/x6@1.12.20) (2021-01-29) ### Bug Fixes * 🐛 should clean cells on destroy graph ([e211c1a](e211c1a)), closes [#600](#600) * change x6-svg-to-shape router ([3c5d11f](3c5d11f))
🎉 This issue has been resolved in the following release 🎉
Thanks for being a part of the AntV community! 💪💯
Sorry, something went wrong.
This thread has been automatically locked because it has not had recent activity.
Please open a new issue for related bugs and link to relevant comments in this thread.
No branches or pull requests
Expected Behavior
x6销毁的时候,能正常调用相关的钩子
Current Behavior
自定义工具,进行事件绑定,但销毁的时候,未执行remove钩子
https://codesandbox.io/s/cranky-cloud-m7xxc?file=/src/app.tsx
Possible Solution
在调用
dispose
前线调用this.graph.clearCells();
,但除了节点外,不知道其他的功能(滚动、画布等)是否也正常destroySteps To Reproduce
Error Message & Stack Trace
Additional Context
Your Environment
The text was updated successfully, but these errors were encountered: