Skip to content

Commit

Permalink
Merge pull request #24 from yahoo/responsive
Browse files Browse the repository at this point in the history
fixed #9
hankhsiao committed Mar 17, 2016
2 parents 7bb7c1a + 5462ec5 commit aad7c7d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Sticky.jsx
Original file line number Diff line number Diff line change
@@ -200,8 +200,11 @@ class Sticky extends Component {
*/
update () {
var self = this;
var disabled = !self.props.enabled ||
self.state.bottomBoundary - self.state.topBoundary <= self.state.height ||
(self.state.width === 0 && self.state.height === 0);

if (self.state.bottomBoundary - self.state.topBoundary <= self.state.height || !self.props.enabled) {
if (disabled) {
if (self.state.status !== STATUS_ORIGINAL) {
self.reset();
}

0 comments on commit aad7c7d

Please sign in to comment.