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

Commit

Permalink
fix arrow position for top-aligned bubbles, fix scroll issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordon Koo committed Aug 2, 2012
1 parent cc1bd9d commit d4a8e29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/hopscotch.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@
this.initArrow = function() {
this.arrowEl = document.createElement('div');
this.arrowEl.setAttribute('id', 'hopscotch-bubble-arrow');
this.containerEl.appendChild(this.arrowEl);
this.element.appendChild(this.arrowEl);
};

this.renderStep = function(step, idx, isLast, callback) {
Expand Down Expand Up @@ -739,7 +739,7 @@
// setInterval overhead.
// To increase or decrease duration, change the divisor of scrollIncr.
direction = (windowTop > targetTop) ? -1 : 1; // -1 means scrolling up, 1 means down
scrollIncr = Math.abs(windowTop - targetTop) / (opt.scrollDuration/10);
scrollIncr = Math.abs(windowTop - scrollToVal) / (opt.scrollDuration/10);
scrollInt = setInterval(function() {
var scrollTop = utils.getScrollTop(),
scrollTarget = scrollTop + (direction * scrollIncr);
Expand Down

0 comments on commit d4a8e29

Please sign in to comment.