Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Commit

Permalink
check backwards-direction multipage, for when onPrev wants to go to p…
Browse files Browse the repository at this point in the history
…revious page
  • Loading branch information
Gordon Koo committed Apr 15, 2013
1 parent 3f63619 commit 6f00b11
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 34 deletions.
12 changes: 8 additions & 4 deletions js/hopscotch-0.0.5.js
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,12 @@
doCallbacks = utils.valOrDefault(doCallbacks, true);
step = getCurrStep();
origStep = step;
wasMultiPage = step.multipage;
if (direction > 0) {
wasMultiPage = origStep.multipage;
}
else {
wasMultiPage = (currStepNum > 0 && currTour.steps[currStepNum-1].multipage);
}

/**
* Callback for goToStepWithTarget
Expand All @@ -1538,9 +1543,8 @@
utils.invokeEventCallbacks('prev', origStep.onPrev);
}

if (direction > 0 && wasMultiPage) {
// Next step is on a different page, so no need to attempt to
// render it.
if (wasMultiPage) {
// Next step is on a different page, so no need to attempt to render it.
return;
}
}
Expand Down
Loading

0 comments on commit 6f00b11

Please # to comment.