Skip to content

Conversation

@johanbissemattsson
Copy link
Owner

@johanbissemattsson johanbissemattsson commented Aug 12, 2020

Use own fork of Svelte with spring animation fix until sveltejs#4531 is merged with Svelte.

sveltejs#4468

In some situations animating a spring causes the spring value to animate in the wrong direction for the first tick.

For example, animating 100 to 0, logging the value inside the spring function shows:

100.1 -> 98 -> 87 -> 80 -> all good

That 100.1 is problematic, it causes a slight jump at the start of the animation.

As stated in the referenced issue I wasn't able to reproduce this with a test or on the REPL, this PR did solve the issue in my project.

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR relates to an outstanding issue, so please reference it in your PR, or create an explanatory one for discussion. In many cases features are absent for a reason.
  • This message body should clearly illustrate what problems it solves. If there are related issues, remember to reference them.
  • Ideally, include a test that fails without this PR but passes with it. PRs will only be merged once they pass CI. Haven’t included a test as I don’t know what causes the issue.
  • Remember to npm run lint!

Tests

  • Run the tests tests with npm test or yarn test

sveltejs#4468

In some situations animating a spring causes the spring value to animate in the wrong direction for the first tick.

For example, animating 100 to 0, logging the value inside the spring function shows:

100.1 -> 98 -> 87 -> 80 -> all good

That 100.1 is problematic, it causes a slight jump at the start of the animation.

As stated in the referenced issue I wasn't able to reproduce this with a test or on the REPL, this PR did solve the issue in my project.

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR relates to an outstanding issue, so please reference it in your PR, or create an explanatory one for discussion. In many cases features are absent for a reason.
  • This message body should clearly illustrate what problems it solves. If there are related issues, remember to reference them.
  • Ideally, include a test that fails without this PR but passes with it. PRs will only be merged once they pass CI. Haven’t included a test as I don’t know what causes the issue.
  • Remember to npm run lint!

Tests

  • Run the tests tests with npm test or yarn test

@johanbissemattsson johanbissemattsson merged commit f7d63f7 into johanbissemattsson:master Aug 12, 2020
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.

2 participants