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

Commit

Permalink
fix onShow not executed when step.fixedElement
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordon Koo committed Mar 11, 2013
1 parent 68465ac commit e7273e0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 33 deletions.
30 changes: 13 additions & 17 deletions js/hopscotch-0.0.5.js
Expand Up @@ -661,24 +661,15 @@
utils.removeClass(el, 'hide');
this.setPosition(step);
utils.addClass(el, 'hide');
// only want to adjust window scroll for non-fixed elements
if (callback && !step.fixedElement) {
callback();
}
else {
this.show();
}
}
else {
// Don't care about height for the other orientations.
this.setPosition(step);
// only want to adjust window scroll for non-fixed elements
if (callback && !step.fixedElement) {
callback();
}
else {
this.show();
}
}

// only want to adjust window scroll for non-fixed elements
if (callback) {
callback(!step.fixedElement);
}

return this;
Expand Down Expand Up @@ -1557,11 +1548,16 @@
}

isLast = (stepNum === numTourSteps - 1);
bubble.render(step, stepNum, isLast, function() {
bubble.render(step, stepNum, isLast, function(adjustScroll) {
// when done adjusting window scroll, call bubble.show()
adjustWindowScroll(function() {
if (adjustScroll) {
adjustWindowScroll(function() {
bubble.show();
});
}
else {
bubble.show();
});
}

if (step.onShow) { step.onShow(); }

Expand Down
32 changes: 16 additions & 16 deletions js/hopscotch-0.0.5.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e7273e0

Please sign in to comment.