Repository navigation
fix(scene): tell the frame again where the middle of the window is once the layout has followed a resize - #89
Conversation
…ce the layout has followed a resize The offset of a centred dialog of a framed page (MODAL_FRAME) was told in the window's resize event, which runs before the size observer has the new size: a window snapped, maximised or restored in one step moved the dialog by the offset of the previous size and narrowed it by the same stale number, and nothing told again. It is now told again after the layout that depends on the size, the rail and the bar has been made.
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
说明
嵌入面板 iframe 的页面里,居中弹窗靠面板下发的偏移量站在整个窗口的中间,宽度也按它收窄。偏移量此前只在弹窗打开时和 window 的 resize 事件里计算,而 resize 事件先于 ResizeObserver 更新尺寸,窗口一次性变化(贴边、最大化、还原)时偏移量差一整步,弹窗被平移到错误位置、宽度按旧尺寸收窄,内容被裁切;观察器更新尺寸后也不会再下发。再调整一次窗口才恢复。
修改