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
refresh执行中会判断元素如果设置为culling则会判断是否在可视区域中,不在则不会渲染。而之前切换页面时会导致zrender宿主dom的尺寸变为长宽为0, 所以无论如何判断元素都不会渲染 而调用resize函数后, 源码确实会计算当前视窗尺寸但是没有设置_width 和 _height 这两个私有属性
zrender/src/canvas/Painter.ts
Lines 870 to 884 in 247e119
Lines 413 to 440 in 247e119
zrender/src/graphic/Displayable.ts
Lines 208 to 223 in 247e119
前置
Lines 883 to 884 in 247e119
再调用一遍refrsh(true)进行全部刷新 😭 (this.zrenderIns.painter.refresh as EtSafeAny)(true); Ts 语法还报错 可以的话这玩意也修复下
The text was updated successfully, but these errors were encountered:
切换页面应该要 dispose 掉的,回到该页面重新初始化
Sorry, something went wrong.
No branches or pull requests
问题描述
前置条件
复现步骤
2024-10-01.08.12.31.mov
问题分析
refresh执行中会判断元素如果设置为culling则会判断是否在可视区域中,不在则不会渲染。而之前切换页面时会导致zrender宿主dom的尺寸变为长宽为0, 所以无论如何判断元素都不会渲染
而调用resize函数后, 源码确实会计算当前视窗尺寸但是没有设置_width 和 _height 这两个私有属性
zrender/src/canvas/Painter.ts
Lines 870 to 884 in 247e119
这段代码会使用_width和_height
zrender/src/canvas/Painter.ts
Lines 413 to 440 in 247e119
Line 215 永真
zrender/src/graphic/Displayable.ts
Lines 208 to 223 in 247e119
可能方案
前置
zrender/src/canvas/Painter.ts
Lines 883 to 884 in 247e119
临时方案
再调用一遍refrsh(true)进行全部刷新 😭
(this.zrenderIns.painter.refresh as EtSafeAny)(true); Ts 语法还报错 可以的话这玩意也修复下
The text was updated successfully, but these errors were encountered: