fix(image-annotate): dom 模板多余闭合标签导致状态栏被挤出 modal、右侧漏出宿主界面(1.1.0 布局修复)
This commit is contained in:
1 parent
662d7eae77
commit
be05f31479
3 files changed
+12
-2
No files matched your search
@@ -212,7 +212,6 @@ import { bindEvents } from './events.js'
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="iwb-editor-footer">
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1761,7 +1761,6 @@ var __IWB_ANNOTATE_MANIFEST__ = {
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="iwb-editor-footer">
|
||||
|
||||
</div>
|
||||
|
||||
@@ -115,6 +115,18 @@ check('编辑器打开 + 便利 UI 五区齐全', await page.evaluate(() => {
|
||||
check('新增选区工具按钮', (await page.locator('.iwb-editor-tool[data-tool="marquee"]').count()) === 1 &&
|
||||
(await page.locator('.iwb-editor-tool[data-tool="lasso"]').count()) === 1)
|
||||
|
||||
check('modal 铺满视口、状态栏贴在 modal 底部(防多余 </div> 把状态栏挤成 overlay 的 flex 兄弟)', await page.evaluate(() => {
|
||||
const ov = document.querySelector('#iwb-editor-overlay')
|
||||
const modal = ov.querySelector('.iwb-editor-modal')
|
||||
const sb = ov.querySelector('.iwb-editor-statusbar')
|
||||
if (!ov || !modal || !sb) return false
|
||||
const vw = window.innerWidth
|
||||
const m = modal.getBoundingClientRect(), s = sb.getBoundingClientRect(), o = ov.getBoundingClientRect()
|
||||
const inside = (a, b) => a.left >= b.left - 1 && a.right <= b.right + 1 && a.top >= b.top - 1 && a.bottom <= b.bottom + 1
|
||||
return Math.round(m.width) === vw && Math.round(o.width) === vw &&
|
||||
Math.abs(s.bottom - m.bottom) < 3 && inside(m, o) && inside(s, m)
|
||||
}))
|
||||
|
||||
const imgBox = await page.locator('.iwb-editor-layer-canvas').first().boundingBox()
|
||||
const drag = async (x1, y1, x2, y2) => {
|
||||
await page.mouse.move(x1, y1)
|
||||
|
||||
Reference in new issue
Block a user