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:
Jonathan Lee
2018-11-16 11:59:57 -08:00
committed by Facebook Github Bot
parent 8fb228f313
commit 383ea9923a

View File

@@ -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.