Skip to content
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

isScrollingDown in progress event listener #4

Open
Salitehkat opened this issue May 27, 2022 · 0 comments
Open

isScrollingDown in progress event listener #4

Salitehkat opened this issue May 27, 2022 · 0 comments

Comments

@Salitehkat
Copy link

Salitehkat commented May 27, 2022

Good morning and thank you very much for this plugin.
I was wondering if its possible to detect isScrollingDown boolean from inside the 'scroll-scene-progress' eventListener.

scenesContainer.addEventListener('scroll-scene-progress', ({ detail }) => { const { progress } = detail; const percent=(progress * 100).toFixed(1) const index = scenes.indexOf(detail.element); const isScrollingDown = detail.isScrollingDown; // its undefined }

Or in contrary, (which is much more suitable for my needs) is it possible to access the progress value in the'scroll-scene-enter' eventListener?
scenesContainer.addEventListener('scroll-scene-enter', ({ detail }) => { const index = scenes.indexOf(detail.element); const indice=index + 1 const isScrollingDown = detail.isScrollingDown; const { progress } = detail; const percent=(progress * 100).toFixed(1) console.log(percent) // its undefined }

Once again thank you very much,
Sali

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant