fix(image-annotate): v1.17.1 无描边后再点无填充会把对象弄隐形,改为自动恢复描边

This commit is contained in:
qiqi committed 2026-11-09 18:11:10 +08:00
1 parent 3baa76d0cd
commit 352a7668d7
6 files changed
+32 -5

No files matched your search

+15
View File
@@ -2612,6 +2612,21 @@ check('无描边时工具栏描边格画斜杠、选项栏描边色块置灰、
noStroke.strokeBtnNone === true && noStroke.optOff === true && noStroke.noneActive === true,
JSON.stringify({ btn: noStroke.strokeBtnNone, opt: noStroke.optOff, none: noStroke.noneActive }))
// 对称保护:已经无描边、再把填充也点掉 → 对象会彻底隐形,应当自动把描边还回来
await page.locator('.iwb-editor-color-btn[data-color-slot="fill"]').click()
await page.waitForTimeout(200)
await page.evaluate(() => document.querySelector('.iwb-editor-color-pop [data-color-none]').click())
await page.waitForTimeout(300)
const bothNone = await selectedShapeState()
check('「无描边」后再点「无填充」:自动恢复描边,不会留下一个看不见的对象',
bothNone.fill === false && bothNone.strokeOn === true,
JSON.stringify({ fill: bothNone.fill, strokeOn: bothNone.strokeOn }))
// 回到「无描边」状态给下一条用例用(色板此时停在填充槽,先切回描边)
await page.locator('.iwb-editor-color-btn[data-color-slot="stroke"]').click()
await page.waitForTimeout(200)
await page.evaluate(() => document.querySelector('.iwb-editor-color-pop [data-color-none]').click())
await page.waitForTimeout(280)
// 选色即恢复描边:与「文字描边宽度 0 时选色自动给 6px」同一条逻辑,
// 否则用户选了颜色画面没变化,会以为颜色设置坏了
await page.evaluate(() => {