( value: AnimatedValue | AnimatedValueXY, config: TimingAnimationConfig, )
| 2061 | }; |
| 2062 | |
| 2063 | var timing = function( |
| 2064 | value: AnimatedValue | AnimatedValueXY, |
| 2065 | config: TimingAnimationConfig, |
| 2066 | ): CompositeAnimation { |
| 2067 | var start = function( |
| 2068 | animatedValue: AnimatedValue | AnimatedValueXY, |
| 2069 | configuration: TimingAnimationConfig, |
| 2070 | callback?: ?EndCallback): void { |
| 2071 | callback = _combineCallbacks(callback, configuration); |
| 2072 | var singleValue: any = animatedValue; |
| 2073 | var singleConfig: any = configuration; |
| 2074 | singleValue.stopTracking(); |
| 2075 | if (configuration.toValue instanceof Animated) { |
| 2076 | singleValue.track(new AnimatedTracking( |
| 2077 | singleValue, |
| 2078 | configuration.toValue, |
| 2079 | TimingAnimation, |
| 2080 | singleConfig, |
| 2081 | callback |
| 2082 | )); |
| 2083 | } else { |
| 2084 | singleValue.animate(new TimingAnimation(singleConfig), callback); |
| 2085 | } |
| 2086 | }; |
| 2087 | |
| 2088 | return maybeVectorAnim(value, config, timing) || { |
| 2089 | start: function(callback?: ?EndCallback): void { |
| 2090 | start(value, config, callback); |
| 2091 | }, |
| 2092 | |
| 2093 | stop: function(): void { |
| 2094 | value.stopAnimation(); |
| 2095 | }, |
| 2096 | |
| 2097 | reset: function(): void { |
| 2098 | value.resetAnimation(); |
| 2099 | }, |
| 2100 | |
| 2101 | _startNativeLoop: function(iterations?: number): void { |
| 2102 | var singleConfig = { ...config, iterations }; |
| 2103 | start(value, singleConfig); |
| 2104 | }, |
| 2105 | |
| 2106 | _isUsingNativeDriver: function(): boolean { |
| 2107 | return config.useNativeDriver || false; |
| 2108 | } |
| 2109 | }; |
| 2110 | }; |
| 2111 | |
| 2112 | var decay = function( |
| 2113 | value: AnimatedValue | AnimatedValueXY, |
no test coverage detected
searching dependent graphs…