diff --git a/image-annotate/plugin/editor/dom.js b/image-annotate/plugin/editor/dom.js index 57a72f6..5de35a5 100644 --- a/image-annotate/plugin/editor/dom.js +++ b/image-annotate/plugin/editor/dom.js @@ -212,7 +212,6 @@ import { bindEvents } from './events.js' - diff --git a/image-annotate/src/index.js b/image-annotate/src/index.js index 297d4f4..d01a719 100644 --- a/image-annotate/src/index.js +++ b/image-annotate/src/index.js @@ -1761,7 +1761,6 @@ var __IWB_ANNOTATE_MANIFEST__ = { - diff --git a/image-annotate/tools/harness.mjs b/image-annotate/tools/harness.mjs index a526759..a754d2a 100644 --- a/image-annotate/tools/harness.mjs +++ b/image-annotate/tools/harness.mjs @@ -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 底部(防多余 把状态栏挤成 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)