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

Scrolling jumps at end of loop #16

Open
SteveWatson75 opened this issue Sep 17, 2021 · 5 comments
Open

Scrolling jumps at end of loop #16

SteveWatson75 opened this issue Sep 17, 2021 · 5 comments

Comments

@SteveWatson75
Copy link

I am using this package for a vertical auto scroll and it is doing everything I need (thanks!) except at the end of the loop it jumps and I can't figure out why.

Screen.Recording.2021-09-17.at.09.57.53.mov
        <View
          style={{
            transform: [{ rotate: '90deg' }],
            width: layout.height * 0.6,
            height: layout.width - theme.baseline * 3,
            borderRadius: 15,
            alignSelf: 'center',
            justifyContent: 'center'
          }}
        >
          <AutoScrolling duration={20000} endPaddingWidth={50} isLTR={true}>
            <FastImage
              source={Images.LoginAnimation}
              style={{
                width: (layout.width - theme.baseline * 2) * 4,
                height: layout.width - theme.baseline * 2
              }}
            />
          </AutoScrolling>
        </View>
@minhtc
Copy link
Collaborator

minhtc commented Sep 17, 2021

Please disable the "isLTR" prop, enable the "isVertical" prop instead of rotate view.

@SteveWatson75
Copy link
Author

I tried using the isVertical prop and it made no difference in the orientation

@SteveWatson75
Copy link
Author

Sorry, I realise that wasn't clear. Initially I enabled the 'isVertical' prop but it didn't affect the orientation of the scroll, that is when I chose to rotate the view an d enable the 'isLTR' prop to get it to work. Is there a usual reason for why the 'isVertical' prop would not work? Is it dependant on the orientation of the image?

@minhtc
Copy link
Collaborator

minhtc commented Sep 22, 2021

@Steven-lunchCo I confirmed that there is an issue with the "vertical" option. I will check it when I have time, thank you for your report.

@zachcowell
Copy link

zachcowell commented Mar 24, 2024

@SteveWatson75 did you find a solution to the jumping? I am currently experiencing the same. It only happens when I apply a vertical transform in the same way through transform: [{ rotate: '90deg' }] . the isVertical and vertical options don't do anything either

Edit: i was able to get vertical scrolling to work (without jumps) by removing the transform. I used the version found in the pull request to add vertical scrolling, found at this commit:

https://github.com/ledmago/react-native-auto-scrolling/blob/57cc77f106695776a9ef63b28b7c9fcfe03942c8/src/index.tsx

I manually added the index.tsx to my project and gave it a vertical={true} and everything is working smoothly. isLTR also works and I can reverse the direction of the vertical scroll 👍

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

3 participants