-
Notifications
You must be signed in to change notification settings - Fork 7
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
Allow LazyLoad to use a custom ComponentObserver and visibility ranges #498
Comments
hello @markhammond and thank you for using my components! I am glad you found them useful :) this sounds like a great feature to have, I will look into it - if it is not too much for my skills, I will include it in the next release (hopefully later this month) - otherwise it will require some time to be done |
@markhammond current basically how it works is that there is an additional parameter that can be passed to a |
Nice @vaadin-miki . The remaining issue is that isFullyVisible() tests for a visible proportion of 1.0. In my case I wanted to allow for partial visibility, that is, not equal to zero (consistent with the w3c default threshold of 0.0). It is difficult to customise the current behaviour as the method performs the check is private. |
@markhammond alrighty, let me think of a nice api for that, I am thinking of allowing custom triggers for considering if a component is visible or not, based on the |
@markhammond alrighty, current new release coming when #502 is done |
Firstly, thank you for sharing LazyLoad and ComponentObserver. Working well with resize events after adapting LazyLoad to test partial visibility
Would be nice to make the default ComponentObserver policy used by LazyLoad more explicit. The default policy implies a threshold range of [0, 1] and requires observed components to become fully visible. For my case it was necessary to consider partially visible components, using a threshold range of 0.0 (consistent with the w3c default policy) and relax the test for fully visible components.
The text was updated successfully, but these errors were encountered: