fix(canvas): 小地图缩小并上移,避开底部工具栏 v3.26.17
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m46s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m46s
This commit is contained in:
1 parent
f35ecb1790
commit
93deea4f5e
14 files changed
+71
-36
No files matched your search
@@ -142,8 +142,11 @@ async function boot (opts) {
|
||||
thumb: () => GOOD,
|
||||
})
|
||||
const widths = () => Array.from(env.host.querySelectorAll('.iwb-history-col')).map((c) => c.style.width)
|
||||
// 默认「中」=110px:列宽应为 110(而不是被 flex 拉满)
|
||||
assert.ok(widths().every((w) => w === '110px'), '默认列宽应为 110px,实际 ' + widths().join(','))
|
||||
// v1.6.6:列宽改为「均分铺满」——图幅只决定列数;各列宽度应一致且总宽 ≈ 容器宽
|
||||
const wNums = widths().map((w) => parseInt(w, 10))
|
||||
assert.ok(wNums.length >= 2, '应至少 2 列,实际 ' + wNums.length)
|
||||
assert.ok(wNums.every((w) => w === wNums[0]), '各列宽度应一致,实际 ' + wNums.join(','))
|
||||
assert.ok(wNums[0] > 40, '列宽应铺满可用宽度,实际 ' + wNums[0])
|
||||
const cols = env.host.querySelectorAll('.iwb-history-col').length
|
||||
assert.ok(cols >= 2, '应至少 2 列,实际 ' + cols)
|
||||
|
||||
@@ -154,13 +157,13 @@ async function boot (opts) {
|
||||
tileSel.value = '200'
|
||||
tileSel.dispatchEvent(new env.window.Event('change'))
|
||||
await wait(60)
|
||||
assert.ok(widths().every((w) => w === '200px'), '切到特大后列宽应为 200px,实际 ' + widths().join(','))
|
||||
{ const big = widths().map((w) => parseInt(w, 10)); assert.ok(big.every((w) => w === big[0] && w > 40), '切到特大后各列仍应等宽铺满,实际 ' + big.join(',')) }
|
||||
|
||||
// v1.6.3 新增「极小」=64px:列宽 64,且列数比「特大」更多(图幅小 = 一行看更多)
|
||||
tileSel.value = '64'
|
||||
tileSel.dispatchEvent(new env.window.Event('change'))
|
||||
await wait(60)
|
||||
assert.ok(widths().every((w) => w === '64px'), '切到极小后列宽应为 64px,实际 ' + widths().join(','))
|
||||
assert.ok(widths().length >= 3, '极小图幅应该更多列,实际 ' + widths().join(','))
|
||||
assert.ok(env.host.querySelectorAll('.iwb-history-col').length > cols, '极小的列数应多于默认列数')
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user