react-scroll
Advanced tools
Comparing version 1.7.14 to 1.7.15
#### Changelog | ||
> 1.7.15 | ||
- Fixed calculation for the offset | ||
> 1.7.14 | ||
@@ -3,0 +5,0 @@ - Removed unsafe warnings |
@@ -29,4 +29,8 @@ 'use strict'; | ||
var calculatingOffsetParent = function calculatingOffsetParent(c, t) { | ||
return t.offsetParent.isEqualNode(c) ? t.offsetTop : t.offsetTop + calculatingOffsetParent(c, t.offsetParent); | ||
}; | ||
var scrollOffset = function scrollOffset(c, t) { | ||
return c === document ? t.getBoundingClientRect().top + (window.scrollY || window.pageYOffset) : getComputedStyle(c).position !== "static" ? t.offsetTop : t.getBoundingClientRect().top + c.scrollTop; | ||
return c === document ? t.getBoundingClientRect().top + (window.scrollY || window.pageYOffset) : getComputedStyle(c).position !== 'static' ? calculatingOffsetParent(c, t) : calculatingOffsetParent(c.offsetParent, t.offsetParent) - c.offsetTop; | ||
}; | ||
@@ -33,0 +37,0 @@ |
{ | ||
"name": "react-scroll", | ||
"version": "1.7.14", | ||
"version": "1.7.15", | ||
"description": "A scroll component for React.js", | ||
@@ -5,0 +5,0 @@ "main": "modules", |
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
100953
2111