react-now-you-see-me
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -93,14 +93,21 @@ 'use strict'; | ||
}, { | ||
key: 'componentWillReceiveProps', | ||
value: function componentWillReceiveProps(nextProps) { | ||
var threshold = nextProps.threshold, | ||
debounce = nextProps.debounce; | ||
key: 'componentDidUpdate', | ||
value: function componentDidUpdate(prevProps) { | ||
var _props = this.props, | ||
threshold = _props.threshold, | ||
debounce = _props.debounce, | ||
boundingLeft = _props.boundingLeft, | ||
boundingRight = _props.boundingRight; | ||
this.isInViewport = (0, _util.inViewport)({ | ||
threshold: threshold, | ||
boundingLeft: this.props.boundingLeft, | ||
boundingRight: this.props.boundingRight, | ||
requireEntireElementInViewport: true | ||
}); | ||
this.checkIsInViewDebounced = (0, _lodash2.default)(this.checkIsInView, debounce); | ||
if (prevProps.threshold !== threshold || prevProps.boundingLeft !== boundingLeft || prevProps.boundingRight !== boundingRight) { | ||
this.isInViewport = (0, _util.inViewport)({ | ||
threshold: threshold, | ||
boundingLeft: boundingLeft, | ||
boundingRight: boundingRight, | ||
requireEntireElementInViewport: true | ||
}); | ||
} | ||
if (prevProps.debounce !== debounce) { | ||
this.checkIsInViewDebounced = (0, _lodash2.default)(this.checkIsInView, debounce); | ||
} | ||
} | ||
@@ -107,0 +114,0 @@ }, { |
{ | ||
"name": "react-now-you-see-me", | ||
"description": "A React component for determining when an element is within a given threshold of the viewport, horizontally.", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"contributors": [ | ||
@@ -6,0 +6,0 @@ "Cory Brown <oh.wise.man@gmail.com>", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
13399
175
0