fix(runtime): size a clip from data-end when it has no data-duration#1578
Open
calcarazgre646 wants to merge 1 commit into
Open
fix(runtime): size a clip from data-end when it has no data-duration#1578calcarazgre646 wants to merge 1 commit into
calcarazgre646 wants to merge 1 commit into
Conversation
The timeline clip loop read only data-duration, then fell through to the inherited (composition) duration when it was absent. A clip authored with data-start/data-end but no data-duration (a valid, compiler-emitted shape the linter only warns about) was sized start..compositionEnd instead of start..end: a 2s..8s clip under a 20s composition rendered as an ~18s bar overrunning every later clip on its track. Read data-end as the duration source before the inherited fallback, mirroring the scene loop and resolveDurationForElement which already do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
collectRuntimeTimelinePayload's clip loop (timeline.ts) resolved a clip's duration fromdata-duration, then fell straight through to the inherited (composition) duration when it was absent. So a clip authored withdata-start+data-endbut nodata-duration(a valid, compiler-emitted shape that the linter only warns about) was sizedstart..compositionEndinstead ofstart..end. Adata-start="2" data-end="8"clip under a 20s composition rendered as an 18s bar (20 - 2) on the Studio timeline instead of 6s, overrunning every later clip on its track.The scene loop (same file) and
startResolver.resolveDurationForElementalready readdata-end; the clip loop was the sibling that did not.Change
Read
data-endas the duration source betweendata-durationand the inherited fallback, mirroring the scene loop (Math.max(0, end - start)). No change for clips that carrydata-duration.Tests
A clip with
data-start="2" data-end="8"and nodata-durationunder a 20s composition now reports duration 6, not 18. Verified load-bearing (reverting the fix produces 18). Full core suite green.