mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 12:15:37 +08:00
Add bounce method to TouchableBounce
Summary: Adds a `bounce` method that just bounces the element without invoking any callbacks. Differential Revision: D13085800 fbshipit-source-id: 310b273b260c924fbde32bfad1de7226d068bd57
This commit is contained in:
committed by
Facebook Github Bot
parent
8fb228f313
commit
383ea9923a
@@ -105,6 +105,13 @@ const TouchableBounce = ((createReactClass({
|
||||
}).start(callback);
|
||||
},
|
||||
|
||||
/**
|
||||
* Triggers a bounce animation without invoking any callbacks.
|
||||
*/
|
||||
bounce: function() {
|
||||
this.bounceTo(0.93, 0.1, 0, () => this.bounceTo(1, 0.4, 0));
|
||||
},
|
||||
|
||||
/**
|
||||
* `Touchable.Mixin` self callbacks. The mixin will invoke these if they are
|
||||
* defined on your component.
|
||||
|
||||
Reference in New Issue
Block a user