react-native/Libraries
Leland Richardson 3eb32cbb0e Animated.multiply and Animated.add to combine animated values
Summary:
This PR was created in response to feedback from an older PR: https://github.com/facebook/react-native/pull/2045

The `.interpolate()` API of Animated values is quite effective to accomplish transformations based on a single animated value, but currently there is a class of animations that is impossible: animations being driven by more than one value.

Usage would be like the following:

```js
getInitialState: function() {
  return {
    panY: new Animated.Value(0),
    offset: new Animated.Value(0),
  };
}
```

```js
var scale = Animated.add(panY, offset).interpolate({
  inputRange: [...],
  outputRange: [...],
});
```

I have a real use case for this, and I cannot think of any way to accomplish what I need without an API like this.

The animation I am trying to accomplish is I have a PanResponder being used to detect both x and y panning. The y-axis panning drives a 3d sroll-like animation (which we can call `panY`), and the x-axis panning is driving a "swipe-to-remove" animation (
Closes https://github.com/facebook/react-native/pull/4395

Reviewed By: svcscm

Differential Revision: D2731305

Pulled By: vjeux

fb-gh-sync-id: 3b9422f10c7e7f3b3ecd270aeed8ea92315a89e9
2015-12-10 13:30:27 -08:00
..
ART Mark `-[init]` w RCT_NOT_IMPLEMENTED 2015-11-14 06:29:27 -08:00
ActionSheetIOS Add tintColor for buttons. 2015-12-09 05:19:25 -08:00
AdSupport Text highlighting on iOS 2015-07-24 08:41:58 -08:00
Animated Animated.multiply and Animated.add to combine animated values 2015-12-10 13:30:27 -08:00
AppRegistry Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
AppStateIOS revert D2372548 to fix initial app state issue 2015-09-25 13:25:26 -07:00
BatchedBridge Fixed bug where module with moduleID of zero wouldn't be loaded 2015-12-10 07:12:29 -08:00
CameraRoll RCTImagePickerManager crash on image from CameraRoll 2015-12-01 02:13:28 -08:00
Components add Clipboard component for ios and android 2015-12-09 10:04:21 -08:00
CustomComponents Support onLayout and onContentSizeChange attributes on ListView 2015-12-10 12:46:31 -08:00
DebugComponentHierarchy Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
Device Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
Devtools Use pre-bundled elements inspector 2015-10-29 11:21:32 -07:00
Fetch Add fetch's clone function to Request and Response prototypes 2015-10-30 10:57:33 -07:00
Geolocation Refactored module access to allow for lazy loading 2015-11-25 04:49:45 -08:00
Image Fixed image tinting 2015-12-10 09:09:30 -08:00
Inspector Inspecting stateless components. 2015-12-08 10:13:25 -08:00
Interaction Make InteractionManager.runAfterInteractions() return a Promise 2015-11-09 20:14:26 -08:00
JavaScriptAppEngine fix several lint warnings 2015-12-01 07:26:29 -08:00
LayoutAnimation Wrapped UIManager native module for better abstraction 2015-11-27 07:00:32 -08:00
LinkingIOS Add support for Universal Links 2015-12-04 09:05:31 -08:00
Modal Improve Modal docs describing iOS only support 2015-12-05 18:48:28 -08:00
NativeApp Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
Network Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
Picker Added support for styling the PickerIOS 2015-12-08 07:48:26 -08:00
Portal Wrapped UIManager native module for better abstraction 2015-11-27 07:00:32 -08:00
PullToRefresh Rename PullToRefreshLayoutAndroid -> PullToRefreshViewAndroid 2015-12-07 08:33:25 -08:00
PushNotificationIOS Refactored module access to allow for lazy loading 2015-11-25 04:49:45 -08:00
QuickPerformanceLogger added QPL for main interactions 2015-09-29 22:25:23 -07:00
RCTTest fix several lint warnings 2015-12-01 07:26:29 -08:00
RKBackendNode Wrapped UIManager native module for better abstraction 2015-11-27 07:00:32 -08:00
ReactIOS better error message for `propTypes` check 2015-12-09 04:06:31 -08:00
ReactNative revert D2707930 2015-12-03 18:29:28 -08:00
Sample Remove invariant of Sample.ios.js that is not used 2015-05-26 18:25:00 -07:00
Settings Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
Storage Batch AsyncStorage.multiGet calls 2015-12-03 09:10:29 -08:00
StyleSheet enable the minWidth/maxWidth/minHeight/maxHeight features 2015-11-17 10:58:32 -08:00
Text Fix Text + TouchableWithoutFeedback 2015-12-09 17:18:26 -08:00
Utilities Add fbsystrace markers using the legacyprofiler 2015-12-10 04:39:31 -08:00
Vibration Text highlighting on iOS 2015-07-24 08:41:58 -08:00
WebSocket Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
react-native add Clipboard component for ios and android 2015-12-09 10:04:21 -08:00
vendor Fix errors uncovered by v0.19.0 2015-12-01 20:11:26 -08:00
Promise.js