Skip to content

Fix terminal values after hold keyframes - #434

Open
GIfatahTH wants to merge 1 commit into
xvrh:masterfrom
GIfatahTH:fix/hold-keyframe-terminal-value
Open

GIfatahTH wants to merge 1 commit into
xvrh:masterfrom
GIfatahTH:fix/hold-keyframe-terminal-value

Conversation

@GIfatahTH

Copy link
Copy Markdown

Hold keyframes currently replace endValue with startValue during parsing. This prevents KeyframesParser.setEndFrames() from backfilling the segment's actual target from the following keyframe. When the following terminal keyframe is removed, its value is lost and the animation remains frozen at the held value.

This change introduces a hold curve that stays at progress 0 through the segment and reaches 1 at its boundary. Hold segments now retain a null endValue until setEndFrames() fills it from the next keyframe. The same behavior is applied to ordinary and multidimensional animated keyframes.

A rendering regression test verifies that an opacity property held at 0 changes to 100 at the terminal keyframe boundary.

Validation: flutter test test/hold_keyframe_test.dart passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant