Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

Ensure that non-additive animations begin from the presentation layer state when beginFromCurrentState is enabled #76

Merged
merged 2 commits into from
Nov 30, 2017

Conversation

jverkoey
Copy link
Contributor

@jverkoey jverkoey commented Nov 29, 2017

When beginFromCurrentState is enabled, the user expects any new animations to animate from the layer's current presentation state.

What this actually means in practice depends on whether the new animation is additive or not.

If the animation is additive, we always want to read from the model layer because we need to calculate displacement from the old destination to the new destination.

If the animation is not additive, we read from the presentation layer if available so that the view begins animating from its current rendered position.

The difference between the two approaches is that additive animations will always appear to preserve momentum - potentially even moving in the opposite direction for a brief moment - while non-additive animations will instantly begin moving toward the new destination.

…entState is enabled.

When beginFromCurrentState is enabled, the user expects any new animations to animate from the layer's current rendered state.

What this actually means in practice depends on whether the new animation is additive or not.

If the animation is additive, we always want to read from the model layer because we need to calculate displacement from the old destination to the new destination.

If the animation is not additive, we read from the presentation layer if available so that the view begins animating from its current rendered position.

The difference between the two approaches is that additive animations will always appear to preserve momentum - potentially even moving in the opposite direction for a brief moment - while non-additive animations will instantly begin moving toward the new destination.
@jverkoey jverkoey requested review from samnm and romoore November 29, 2017 22:10
@jverkoey jverkoey changed the title Add fallback mechanism for non-additive animations when beginFromCurrentState is enabled. Ensure that non-additive animations begin from the presentation layer state when beginFromCurrentState is enabled Nov 29, 2017
@jverkoey jverkoey merged commit 433eb5f into develop Nov 30, 2017
@jverkoey jverkoey deleted the additiveearly branch November 30, 2017 14:19
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants