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

Commit d4a8e29

Browse files
author
Gordon Koo
committed
fix arrow position for top-aligned bubbles, fix scroll issue
1 parent cc1bd9d commit d4a8e29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/hopscotch.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@
487487
this.initArrow = function() {
488488
this.arrowEl = document.createElement('div');
489489
this.arrowEl.setAttribute('id', 'hopscotch-bubble-arrow');
490-
this.containerEl.appendChild(this.arrowEl);
490+
this.element.appendChild(this.arrowEl);
491491
};
492492

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

0 commit comments

Comments
 (0)