react-native-macos/Libraries/Animated
Jani Eväkallio e93d496f6d Add Animated.ValueXY.extractOffset
Summary:
The `extractOffset` method is previously implemented on `Animated.Value`, along with `setOffset` and `flattenOffset`. Both of the latter methods are proxied on `Animated.ValueXY`, but `extractOffset` is not. This commit adds the missing method.

When creating draggable elements in XY space, in order to compensate for previous gestures' offsets, we currently need to do something like the following at the beginning or end of each gesture:
```
xy.setOffset(xy.__getValue());
xy.setValue({x: 0, y: 0});
```

After this commit, the API is equivalent to using a plain `Animated.Value`:
```
xy.extractOffset();
```
Closes https://github.com/facebook/react-native/pull/12193

Differential Revision: D4508717

Pulled By: mkonicek

fbshipit-source-id: 0976cf1ab68538e59023ffaa2539eb62779ad874
2017-02-03 12:14:09 -08:00
..
examples Make fbsource and GitHub consistent 2016-02-25 17:13:25 -08:00
release Initial web implementation 2015-09-22 11:58:37 -07:00
src Add Animated.ValueXY.extractOffset 2017-02-03 12:14:09 -08:00