fix(runtime): show elements at exact end of their duration (inclusive boundary) (#1166)

Visibility check used strict less-than (currentTime < end), hiding
elements at exactly t=duration. Changed to <= so the last frame
renders the final animation state.
This commit is contained in:
Miguel Ángel
2026-06-02 19:07:10 -04:00
committed by GitHub
parent 248f640734
commit b652c0a235
+1 -1
View File
@@ -1413,7 +1413,7 @@ export function initSandboxRuntimeModular(): void {
duration != null && duration > 0 ? start + duration : Number.POSITIVE_INFINITY;
const isVisibleNow =
state.currentTime >= start &&
(Number.isFinite(computedEnd) ? state.currentTime < computedEnd : true);
(Number.isFinite(computedEnd) ? state.currentTime <= computedEnd : true);
rawNode.style.visibility = isVisibleNow ? "visible" : "hidden";
}
};