From 4ef1a2d623220155d39f4ef71d9119d05242db9e Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sat, 4 May 2019 12:14:07 -0400 Subject: [PATCH] document new spring options --- site/content/docs/03-run-time.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md index ed19c3b00927..dfb270dc979a 100644 --- a/site/content/docs/03-run-time.md +++ b/site/content/docs/03-run-time.md @@ -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. +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) ```html