-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only the half of the elements to be seen are shown. #352
Comments
Without a live demo, I can't effectively troubleshoot this. In general, both scroll and resize event handlers check if elements are visible, and animate the ones that are. The difference is that resize first checks the size of elements, since that may changed during resize. If resize is the only thing that triggers the hidden elements—it sounds like their size is being incorrectly captured on page load. If this is true, you may be calling If you inspect the I recommend looking at the In general, if you have a problem, I recommend trying to understand what the store data looks like—especially if you can‘t provide a working demo of the problem. However, creating a JSBin that demonstrates the issue is the best way to receive support. |
Well this appears to be an issue on both v3 and v4, but it’s not something I’ve encountered before. After a look around the site (thanks for the live demo @Vicula) I don’t see what’s wrong. I’ve modified v3 for you @Vicula with a public |
I switched out my version for the debug version. I ran some of the Li's with |
@cobblehillmachine I believe I have found the issue. This line at the bottom of return top < viewBottom &&
bottom > viewTop &&
left > viewLeft && // this compares left to left?
right < viewRight // this compares right to right? Looking at this logic, and the output numbers, I believe it should operate like this return top < viewBottom &&
bottom > viewTop &&
left < viewRight &&
right > viewLeft This follows the same convention, and in my tests, fixes the issue. However, this error in conditional logic is not present in v4—so if @AbrahamHalil is experiencing this issue on v4, it must be something different. |
I can confirm that @jlmakes 's solution fixed my problem. |
@cobblehillmachine I just patched to Available at: @AbrahamHalil If you are still having this issue, can you please open a new issue with a live demonstration of the problem so it can be debugged? If a similar bug is also happening in v4, I would love to get this squashed. |
@jlmakes You left a console.log on line 172. |
That was not added recently or left there by mistake. That is by design in version 3—it warns you when All I changed in the recent patch is the conditional logic fix. In version 4 however, there is a debug flag to enabled/disable log messages. |
Hi,
Today I ran into a problem. Only the half of the elements to be seen are shown (screenshot below).
I have to resize the browser vertically, then come the the other elements.
Any Ideas?
Best Regards
I am using
https://unpkg.com/scrollreveal@4.0.0-beta.5
The text was updated successfully, but these errors were encountered: