Repository navigation
fix(sheet): centre the sheet on the window only when the frame has the room - #91
Conversation
…e room A frame that is the detail pane beside the list puts the window middle near its edge; the width term went negative and the width fell back to auto, a sliver. The sheet now stands in the middle of the frame at its full width when the window-centred placement cannot hold it, and the under-600 bottom sheet stays for standalone windows.
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
说明
#90 让窄 frame 的居中弹窗变成横跨 frame 的底部弹层,弹层仍贴着 frame 底边,不是居中形态。设置页的 frame 只是列表右侧的详情区时,窗口中心还会落在 frame 边缘之外:偏移使宽度公式的第三项为负,
width退回auto,弹窗塌缩成逐字换行的细条(“强制指定捕获方法”选择器)。修改
useModalBridge收到 frame 偏移时判断 frame 是否容得下按窗口居中的弹窗(centresOnWindow),并标记data-m-frame="fit" | "frame"。fit:保持按 GUI 窗口居中,宽度按可用空间收窄。frame:弹窗在内容 frame 内居中、使用完整设计宽度min(600px, 100vw - 32px),不再依赖偏移量,不会塌缩。