Comparing version 1.1.2 to 1.1.3
@@ -7,2 +7,6 @@ # Changelog | ||
## [1.1.3] - 2018-05-05 | ||
### Fixed | ||
- Previous simplification made things worse, so revert it | ||
## [1.1.2] - 2018-05-03 | ||
@@ -9,0 +13,0 @@ ### Changed |
@@ -59,9 +59,9 @@ "use strict"; | ||
var direction = scroll - oldScroll > 0 ? 'down' : 'up'; | ||
var top = _this.state.top + oldScroll - scroll; | ||
var height = _this.internalRef.getBoundingClientRect().height; | ||
if (direction === 'down') { | ||
var height = _this.internalRef.getBoundingClientRect().height; | ||
_this.setState({ top: -height }); | ||
_this.setState({ top: Math.max(top, -height) }); | ||
} | ||
else { | ||
var top_1 = _this.state.top + oldScroll - scroll; | ||
_this.setState({ top: Math.min(top_1, 0) }); | ||
_this.setState({ top: Math.min(top, 0) }); | ||
} | ||
@@ -68,0 +68,0 @@ _this.setState({ scroll: scroll }); |
{ | ||
"name": "app-bar", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "An app bar for React that stays out of your way", | ||
@@ -5,0 +5,0 @@ "licence": "MIT", |
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
12762