@@ -626,7 +626,7 @@ var $AnimateCssProvider = ['$animateProvider', function($animateProvider) {
626
626
627
627
var timings = computeTimings ( node , fullClassName , cacheKey ) ;
628
628
var relativeDelay = timings . maxDelay ;
629
- maxDelay = Math . max ( relativeDelay , 0 ) ;
629
+ maxDelay = Math . max ( relativeDelay , 0 ) || 0 ;
630
630
maxDuration = timings . maxDuration ;
631
631
632
632
var flags = { } ;
@@ -665,7 +665,7 @@ var $AnimateCssProvider = ['$animateProvider', function($animateProvider) {
665
665
// we need to recalculate the delay value since we used a pre-emptive negative
666
666
// delay value and the delay value is required for the final event checking. This
667
667
// property will ensure that this will happen after the RAF phase has passed.
668
- if ( timings . transitionDuration > 0 ) {
668
+ if ( options . duration == null && timings . transitionDuration > 0 ) {
669
669
flags . recalculateTimingStyles = flags . recalculateTimingStyles || isFirst ;
670
670
}
671
671
@@ -742,6 +742,9 @@ var $AnimateCssProvider = ['$animateProvider', function($animateProvider) {
742
742
applyAnimationClasses ( element , options ) ;
743
743
applyAnimationStyles ( element , options ) ;
744
744
745
+ // we increment the counter so that if the same element is animated
746
+ // then the existing cache will not apply to it
747
+
745
748
// the reason why we have this option is to allow a synchronous closing callback
746
749
// that is fired as SOON as the animation ends (when the CSS is removed) or if
747
750
// the animation never takes off at all. A good example is a leave animation since
@@ -854,7 +857,7 @@ var $AnimateCssProvider = ['$animateProvider', function($animateProvider) {
854
857
855
858
timings = computeTimings ( node , fullClassName , cacheKey ) ;
856
859
relativeDelay = timings . maxDelay ;
857
- maxDelay = Math . max ( relativeDelay , 0 ) ;
860
+ maxDelay = Math . max ( relativeDelay , 0 ) || 0 ;
858
861
maxDuration = timings . maxDuration ;
859
862
860
863
if ( maxDuration === 0 ) {
@@ -871,7 +874,7 @@ var $AnimateCssProvider = ['$animateProvider', function($animateProvider) {
871
874
? parseFloat ( options . delay )
872
875
: relativeDelay ;
873
876
874
- maxDelay = Math . max ( relativeDelay , 0 ) ;
877
+ maxDelay = Math . max ( relativeDelay , 0 ) || 0 ;
875
878
876
879
var delayStyle ;
877
880
if ( flags . applyTransitionDelay ) {
0 commit comments