Skip to content

Commit

Permalink
feat: pass additional parameters to offset callback (#135)
Browse files Browse the repository at this point in the history
* Add parameter to offset callback function

* build vue-scrollto.js
lukasbesch authored and rigor789 committed Sep 10, 2019
1 parent d2a0e05 commit e862213
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/scrollTo.js
Original file line number Diff line number Diff line change
@@ -166,7 +166,7 @@ export const scroller = () => {
var cumulativeOffsetElement = _.cumulativeOffset(element);

if (typeof offset === "function") {
offset = offset();
offset = offset(element, container);
}

initialY = scrollTop(container);
2 changes: 1 addition & 1 deletion vue-scrollto.js
Original file line number Diff line number Diff line change
@@ -378,7 +378,7 @@
var cumulativeOffsetElement = _.cumulativeOffset(element);

if (typeof offset === "function") {
offset = offset();
offset = offset(element, container);
}

initialY = scrollTop(container);

0 comments on commit e862213

Please sign in to comment.