vue-scrollto
Advanced tools
Comparing version 2.5.2 to 2.5.3
15
index.js
@@ -24,2 +24,14 @@ "use strict"; | ||
} | ||
}, | ||
cumulativeOffset: function(element) { | ||
var top = 0; | ||
do { | ||
top += element.offsetTop || 0; | ||
element = element.offsetParent; | ||
} while (element); | ||
return { | ||
top: top | ||
}; | ||
} | ||
@@ -86,4 +98,5 @@ }; | ||
var elementOffsetTop = _.cumulativeOffset(element).top; | ||
var initialY = container.scrollTop; | ||
var elementY = element.offsetTop - container.offsetTop; | ||
var elementY = elementOffsetTop - container.offsetTop; | ||
var targetY = elementY; | ||
@@ -90,0 +103,0 @@ |
{ | ||
"name": "vue-scrollto", | ||
"version": "2.5.2", | ||
"version": "2.5.3", | ||
"description": "Adds a directive that listens for click events and scrolls to elements.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
630450
414