Skip to content

Commit

Permalink
fix(timeout): fixes timeouts for animation triggers
Browse files Browse the repository at this point in the history
this fixes the too long timeout, waiting for an animation to trigger

Fixes issue #10
  • Loading branch information
zewa666 committed Jun 9, 2015
1 parent c27e505 commit 9fb1ffa
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/animator.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export class CssAnimator {
this.animationEnteredClass = 'au-entered';
this.animationLeftClass = 'au-left';
this.isAnimating = false;

this.animationTimeout = 50;
}

addMultipleEventListener(el, s, fn) {
Expand Down Expand Up @@ -137,7 +139,7 @@ export class CssAnimator {

resolve(false);
}
}, this.getElementAnimationDelay(element) + 400 + delay);
}, this.getElementAnimationDelay(element) + this.animationTimeout + delay);
});
}

Expand Down Expand Up @@ -223,7 +225,7 @@ export class CssAnimator {

resolve(false);
}
}, this.getElementAnimationDelay(element) + 400 + delay);
}, this.getElementAnimationDelay(element) + this.animationTimeout + delay);
});
}

Expand Down Expand Up @@ -287,7 +289,7 @@ export class CssAnimator {

resolve(false);
}
}, this.getElementAnimationDelay(element) + 400);
}, this.getElementAnimationDelay(element) + this.animationTimeout);
});
}

Expand Down Expand Up @@ -345,7 +347,7 @@ export class CssAnimator {

resolve(false);
}
}, this.getElementAnimationDelay(element) + 400);
}, this.getElementAnimationDelay(element) + this.animationTimeout);
});
}
}

0 comments on commit 9fb1ffa

Please sign in to comment.