* Utility to handle animation of `options`. * @private
(target, values)
| 41 | * @private |
| 42 | */ |
| 43 | _animateOptions(target, values) { |
| 44 | const newOptions = values.options; |
| 45 | const options = resolveTargetOptions(target, newOptions); |
| 46 | if (!options) { |
| 47 | return []; |
| 48 | } |
| 49 | |
| 50 | const animations = this._createAnimations(options, newOptions); |
| 51 | if (newOptions.$shared) { |
| 52 | // Going to shared options: |
| 53 | // After all animations are done, assign the shared options object to the element |
| 54 | // So any new updates to the shared options are observed |
| 55 | awaitAll(target.options.$animations, newOptions).then(() => { |
| 56 | target.options = newOptions; |
| 57 | }, () => { |
| 58 | // rejected, noop |
| 59 | }); |
| 60 | } |
| 61 | |
| 62 | return animations; |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * @private |
no test coverage detected