aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek Szopka <bartek.szopka+github@gmail.com>2012-03-19 20:21:01 +0000
committerBartek Szopka <bartek.szopka+github@gmail.com>2012-03-19 20:21:01 +0000
commitfb32cf1bddfab230e9e3a9514070f4f1aff3241f (patch)
tree235f91effe9f949de3d926b9b03aaecaa70db7ae
parentb3d680eab461db09db537e9da26e601ce59b84ad (diff)
downloadimpress.js-fb32cf1bddfab230e9e3a9514070f4f1aff3241f.tar.gz
only call enter and leave events when necessary
-rw-r--r--js/impress.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/impress.js b/js/impress.js
index e23c637..ccd685d 100644
--- a/js/impress.js
+++ b/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);
}