Ejemplo n.º 1
0
  startAnimation: function(
    refKey: string,
    duration: number,
    delay: number,
    easing: (string | EasingFunction),
    properties: {[key: string]: any}
  ): number {
    var ref = this.refs[refKey];
    invariant(
      ref,
      'Invalid refKey ' + refKey + '; ' +
      'valid refs: ' + JSON.stringify(Object.keys(this.refs))
    );

    var nodeHandle = +ref.getNodeHandle();
    var easingSample = AnimationUtils.evaluateEasingFunction(duration, easing);
    var tag: number = RCTAnimationManager.startAnimation(nodeHandle, AnimationUtils.allocateTag(), duration, delay, easingSample, properties);
    return tag;
  },
Ejemplo n.º 2
0
 stopAnimation: function(tag: number) {
   RCTAnimationManager.stopAnimation(tag);
 },