Skip to content

Commit b5e4ec7

Browse files
committed
fix parallax always: false re animation in resize
1 parent 06dd376 commit b5e4ec7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rc-scroll-anim",
3-
"version": "2.5.8",
3+
"version": "2.5.9",
44
"description": "scroll-anim anim component for react",
55
"keywords": [
66
"react",

src/ScrollParallax.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ class ScrollParallax extends React.Component {
105105
}
106106

107107
resizeEventListener = () => {
108+
if (this.onCompleteBool && !this.props.always) {
109+
return;
110+
}
108111
this.scrollTop = currentScrollTop();
109112
this.target = this.props.targetId && document.getElementById(this.props.targetId);
110113
this.clientHeight = this.target ? this.target.clientHeight : windowHeight();

0 commit comments

Comments
 (0)