Browse files

only call enter and leave events when necessary

  • Loading branch information...
1 parent b3d680e commit fb32cf1bddfab230e9e3a9514070f4f1aff3241f @bartaz committed Mar 19, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 js/impress.js
View
3 js/impress.js
@@ -234,6 +234,7 @@
var onStepLeave = function (step) {
if (lastEntered === step) {
triggerEvent(step, "impress:stepleave");
+ lastEntered = null;
}
};
@@ -420,7 +421,7 @@
expectedTransitionTarget = target.scale > currentState.scale ? root : canvas;
- if (activeStep) {
+ if (activeStep && activeStep !== el) {
onStepLeave(activeStep);
}

0 comments on commit fb32cf1

Please sign in to comment.