Align outro animations at slide end
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile, web, pulse-signage-web) (push) Successful in 1m21s
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile.player, player, pulse-signage-player) (push) Successful in 33s

This commit is contained in:
lzstealth committed 2026-10-26 23:13:11 +00:00
1 parent 8ee59e97d3
commit 24a566a1a4
7 files changed
+88 -49

No files matched your search

+13
View File
@@ -609,4 +609,17 @@ test('template animation preview applies configured delays to the CSS animation
assert.equal(values['animation-delay'], '425ms');
context.applyAnimateCssPreview(rect, 'fadeOut', { duration_ms: 1000, delay_ms: 425 }, 'out');
assert.equal(values['animation-delay'], undefined);
});
test('template outro preview aligns regions using computed CSS animation duration', () => {
const script = fs.readFileSync(require.resolve('../src/web/public/js/templates/template-designer.js'), 'utf8');
assert.match(script, /getComputedAnimationDurationMs\(rect, durationMs\) \* iterations/);
assert.match(script, /mode === 'out' \? Math\.max\(0, longestTimingMs - entry\.runtimeMs\) : entry\.delay/);
assert.match(script, /Number\(rect\.getAttribute\('data-index'\)\)/);
const helper = script.match(/ function getComputedAnimationDurationMs\([^]*?\n }/);
assert.ok(helper);
const context = vm.createContext({ window: { getComputedStyle() { return { animationDuration: '1s, 2.5s' }; } } });
vm.runInContext(helper[0] + '\nthis.getComputedAnimationDurationMs = getComputedAnimationDurationMs;', context);
assert.equal(context.getComputedAnimationDurationMs({}, 900), 2500);
});