Open Rasande opened 6 months ago
Unfortunately, that's not possible at the moment.
Any reason why you can't just disable it before the user scrolls?
I understand, but thank you for the answer!
I was aiming to disable or enable it when the user scrolls past different parts of the page. But once it was enabled it had to fit to a section before it was disabled, no matter how long you scrolled for.
Maybe you can use the afterLoad
callback or the onLeave
callback for that?
Is there a way to prevent a section to fit the screen when you declare fullpage_api.setFitToSection(false) during the delay period of fitToSectionDelay? As of now you have to wait for the delay to run out before it's disabled.
Using the demo from the documentation https://codepen.io/alvarotrigo/pen/GJXNYm and reproduce the following steps:
The closest section still scrolls to the top even though I would assume the function is disabled.
fullPage.js v4.0.20