document new spring options

pull/2675/head
Richard Harris 6 years ago
parent 26d736fc97
commit 4ef1a2d623

@ -486,6 +486,8 @@ A `spring` store gradually changes to its target value based on its `stiffness`
As with [`tweened`](#tweened) stores, `set` and `update` return a Promise that resolves if the spring settles. The `store.stiffness` and `store.damping` properties can be changed while the spring is in motion, and will take immediate effect. As with [`tweened`](#tweened) stores, `set` and `update` return a Promise that resolves if the spring settles. The `store.stiffness` and `store.damping` properties can be changed while the spring is in motion, and will take immediate effect.
Both `set` and `update` can take a second argument — an object with `hard` or `soft` properties. `{ hard: true }` sets the target value immediately; `{ soft: n }` preserves existing momentum for `n` seconds before settling. `{ soft: true }` is equivalent to `{ soft: 0.5 }`.
[See a full example on the spring tutorial.](tutorial/spring) [See a full example on the spring tutorial.](tutorial/spring)
```html ```html

Loading…
Cancel
Save