( value: AnimatedValue | AnimatedValueXY, config: SpringAnimationConfig, )
| 2013 | }; |
| 2014 | |
| 2015 | var spring = function( |
| 2016 | value: AnimatedValue | AnimatedValueXY, |
| 2017 | config: SpringAnimationConfig, |
| 2018 | ): CompositeAnimation { |
| 2019 | var start = function( |
| 2020 | animatedValue: AnimatedValue | AnimatedValueXY, |
| 2021 | configuration: SpringAnimationConfig, |
| 2022 | callback?: ?EndCallback): void { |
| 2023 | callback = _combineCallbacks(callback, configuration); |
| 2024 | var singleValue: any = animatedValue; |
| 2025 | var singleConfig: any = configuration; |
| 2026 | singleValue.stopTracking(); |
| 2027 | if (configuration.toValue instanceof Animated) { |
| 2028 | singleValue.track(new AnimatedTracking( |
| 2029 | singleValue, |
| 2030 | configuration.toValue, |
| 2031 | SpringAnimation, |
| 2032 | singleConfig, |
| 2033 | callback |
| 2034 | )); |
| 2035 | } else { |
| 2036 | singleValue.animate(new SpringAnimation(singleConfig), callback); |
| 2037 | } |
| 2038 | }; |
| 2039 | return maybeVectorAnim(value, config, spring) || { |
| 2040 | start: function(callback?: ?EndCallback): void { |
| 2041 | start(value, config, callback); |
| 2042 | }, |
| 2043 | |
| 2044 | stop: function(): void { |
| 2045 | value.stopAnimation(); |
| 2046 | }, |
| 2047 | |
| 2048 | reset: function(): void { |
| 2049 | value.resetAnimation(); |
| 2050 | }, |
| 2051 | |
| 2052 | _startNativeLoop: function(iterations?: number): void { |
| 2053 | var singleConfig = { ...config, iterations }; |
| 2054 | start(value, singleConfig); |
| 2055 | }, |
| 2056 | |
| 2057 | _isUsingNativeDriver: function(): boolean { |
| 2058 | return config.useNativeDriver || false; |
| 2059 | } |
| 2060 | }; |
| 2061 | }; |
| 2062 | |
| 2063 | var timing = function( |
| 2064 | value: AnimatedValue | AnimatedValueXY, |
nothing calls this directly
no test coverage detected
searching dependent graphs…