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
The page jump also happens if the pages contains too many images, when redirected from the "cross-ref blocks"
当从块引用的链接跳转到一个有很多图片的文档时,图片加载完毕后也会触发页面跳动,等待图片加载完毕后,再从块引用链接跳转才不会出现
Activity
[-]改进折叠标题块后页面大幅跳动[/-][+]Improved page jump after folding heading block[/+]HowcanoeWang commentedon Mar 30, 2023
The page jump also happens if the pages contains too many images, when redirected from the "cross-ref blocks"
当从块引用的链接跳转到一个有很多图片的文档时,图片加载完毕后也会触发页面跳动,等待图片加载完毕后,再从块引用链接跳转才不会出现
88250 commentedon Mar 30, 2023
@HowcanoeWang 图片的高度似乎无法计算。
HowcanoeWang commentedon Mar 30, 2023
可以参考打字机模式,强制从块引用跳转的块 (或聚焦的块) 在屏幕中间(或顶部)垂直居中?
PS:局部加载的大文档,从页面标题大纲中跳转,也会出现这个问题,需要等待加载完毕后,再点击才行
[-]Improved page jump after folding heading block[/-][+]Avoid page jump after folding a header block[/+]88250 commentedon May 1, 2023
@HowcanoeWang 对于图片加载的情况目前没有好的解决方案,因为图片加载完以后会把高度撑高,导致定位不准。
HowcanoeWang commentedon May 1, 2023
有没有可能通过给图片块记录高度信息,然后加载的时候先把高度计算好,用空白块先把图片“撑”起来,然后后续再把图片显示出来?
(添加图片的时候记录,以及对于已经添加的图片,后续成功加载的时候也记录一下)
88250 commentedon May 1, 2023
这个方案不行的,因为实际渲染大小是自适应界面大小的,高度会随着界面大小变化而变化,无法计算出绝对位置。
HowcanoeWang commentedon May 1, 2023
我的想法是,图片渲染的显示逻辑修改一下,在元信息中记录图片的高宽比之后(而不是高度的具体像素),根据页面大小,先计算出图片容器的大小,然后图片后续只能在这个容器里加载出来
(类似于准备好0.001kb的超小图片,可以瞬间加载完把界面撑起来,然后再进行跳转的定位,后续再实现对图片进行替换
🎨 #7785
Vanessa219 commentedon May 3, 2023
只要是加载都会抖动
📝 #7785