feat(image-annotate): 1.2.8 工具栏移至画布底部悬浮(Figma 风格) + 修 canvas-wrap 可编程滚动导致画布跳位(overflow:clip) + computeFit 预留工具条高度 + 工具条上滚轮不缩放

This commit is contained in:
qiqi committed 2026-11-04 22:33:56 +08:00
1 parent a1c3a40f17
commit e1465b9d68
8 files changed
+120 -80

No files matched your search

+20 -1
View File
@@ -96,7 +96,7 @@ const boot = await page.evaluate((png) => {
window.__commands['annotate-selected'].run().catch(() => {})
return { version: window.__manifest.version, settingsSchema: Object.keys(window.__manifest.settings || {}) }
}, PNG)
check('产物可执行(循环打包未炸)', boot.version === '1.2.7', 'version=' + boot.version)
check('产物可执行(循环打包未炸)', boot.version === '1.2.8', 'version=' + boot.version)
check('manifest 声明输出预设设置项', boot.settingsSchema.includes('exportPreset') && boot.settingsSchema.includes('panelsCollapsed'), boot.settingsSchema.join(','))
await page.locator('#iwb-editor-overlay').waitFor({ state: 'visible', timeout: 15000 })
@@ -598,6 +598,25 @@ check('Enter 确认裁剪(画布尺寸变小、与按钮确认等效)',
JSON.stringify(docBeforeEnter) + ' → ' + JSON.stringify(docAfterEnter))
await page.keyboard.press('Control+z')
// ---- v1.2.8:底部浮动工具栏(Figma 风格,用户裁定 2026-11-04) ----
check('工具栏移入画布容器、横排悬浮底部居中(不再在顶栏)', await page.evaluate(() => {
const wrap = document.querySelector('.iwb-editor-canvas-wrap')
const tools = wrap && wrap.querySelector(':scope > .iwb-editor-tools')
if (!tools) return false
const w = tools.getBoundingClientRect(), c = wrap.getBoundingClientRect()
return w.height < w.width &&
Math.abs((w.left + w.right) / 2 - (c.left + c.right) / 2) <= 8 &&
c.bottom - w.bottom <= 30 &&
!document.querySelector('.iwb-editor-header > .iwb-editor-tools')
}))
check('适应窗口后图片底边不被工具条遮挡', await page.evaluate(() => {
const img = document.querySelector('.iwb-editor-layer-canvas')
const tools = document.querySelector('.iwb-editor-canvas-wrap > .iwb-editor-tools')
if (!img || !tools) return false
const i = img.getBoundingClientRect(), t = tools.getBoundingClientRect()
return i.bottom <= t.top + 2
}))
// ---- v1.2.3:橡皮修复 / 钢笔描边实心 / 顶栏输出组右置 ----
// 顶栏输出组(输出+下载+新建+覆盖+退出)贴最右(header 右内边距 12px)