You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{Graph}from'@antv/x6';import{MiniMap}from'@antv/x6-plugin-minimap';exportdefaultclassMyMinimapPluginextendsMiniMap{onRemove(){this.stopListening();// TODO 过于hack,如果graph的代码变了,这里也会有问题this.targetGraph.clearCells=noop;this.targetGraph.dispose();}}functionnoop(this: Graph){returnthis;}
Describe the bug
minimap当前的清理逻辑为
原本的意图应该是防止graph.dispose时自动clearCells,导致model被清空。
但现在这个写法会导致 graph.renderer.sheduler dispose 时,未能正确清理UI渲染相关的监听器,从而导致报错
此问题仅在minimap单独销毁时出现(例如动态开关/切换minimap)
Your Example Website or App
无
Steps to Reproduce the Bug or Issue
无
Expected behavior
不应该有报错
Screenshots or Videos
可以看到经过反复注册销毁,graph.model上绑定了很多未清理的监听器
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: