alvarotrigo / alvarotrigo/react-fullpage
Changing autoScrolling on non full-screen section behaves unexpectedly
- 主要言語
- JavaScript
- スター
- 1.3k
- フォーク
- 172
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
### Description
Hi, I am using React Fullpage for render some sections, and one of them should be non-autoscrollable, so I have some bug when the state will be true, the page will faster scrolling to upper section without animation. Is it possible to deactive autoscrolling and FitToSection on one section, and when it will be other page activate autoscroll but without any jerking?
My code:
{
console.log(destination, 'destination')
if (destination.item.classList.contains('fp-responsive-auto-height') || destination.isLast) {
setIsActive(false)
return
} else {
setIsActive(true)
}
}}
render={({ state, fullpageApi }) => {
if (!isActive) {
fullpageApi.setAutoScrolling(false)
} else {
if (state.initialized) {
fullpageApi.setAutoScrolling(true)
}
}
return (
//*---THIS section is 1200 px height&---*
//*---THIS section is 200 px height&---*
)
}}
/>
//*---after will be also footer section in App components*
### Steps to reproduce it
1. Create full page section
2. Try to make one or two page without autoscrolling and disableFitTosection to avoid any jerking
### Versions
use Chrome, win 10
Thank you in advance!!
コントリビューションガイド
評価
この issue はまだ評価されていません。