修复缩放

This commit is contained in:
tianmo committed 2026-09-19 15:02:27 +08:00
1 parent e2df519d2e
commit e60506ef96
3 files changed
+20 -8

No files matched your search

+2
View File
@@ -31,9 +31,11 @@ for (const root of roots) {
const fit = functionBody(script, 'fitToCanvas', 'draw');
assert.match(fit, /const bounds = stableFitBounds;/);
assert.doesNotMatch(fit, /getBounds\(/, 'wheel/resize fitting must not sample an animated frame');
assert.match(fit, /fitScale = zoom;/, 'wheel zoom must still work before a drawable stable bound exists');
const capture = functionBody(script, 'captureStableFitBounds', 'fitToCanvas');
assert.match(capture, /getBounds\(skeleton\)/);
assert.match(script, /async function setAnimationByName[\s\S]*if \(!stableFitBounds\)[\s\S]*measureVisibleBounds\(skeleton, geometryBounds, 1[\s\S]*captureStableFitBounds\(bounds\)/);
assert.match(css, /#status \{\s*position: absolute; left: 50%;[^}]*transform: translateX\(-50%\)/, 'status notice must be horizontally centered');
const manifest = JSON.parse(fs.readFileSync(path.join(root, 'manifest.json'), 'utf8'));