Skip to content
This repository was archived by the owner on Nov 27, 2022. It is now read-only.

Conversation

aliakbarazizi
Copy link
Contributor

Change pager.js swipe controll for rtl support

Motivation

Enable swipping for rtl language

Test plan

@satya164
Copy link
Owner

This is huge!

Thanks for the PR. I tested it and it works. There's a small issue where the screen shakes when you touch it or when you lift your finger.

@satya164 satya164 requested a review from osdnk April 11, 2019 10:49
@alikazemkhanloo
Copy link

alikazemkhanloo commented Apr 11, 2019

The issue that @satya164 just mentioned is because of this line
https://github.com/react-native-community/react-native-tab-view/pull/740/files#diff-13c90f71216108ed4d0e57b27084346bL291

I used timing and its configs from next line instead of spring , and it worked. But this is not a solution. just a clue to solve the problem.

@aliakbarazizi
Copy link
Contributor Author

Ok, I spent many hours to solve this issue and I'm stuck in it.

I figure out I should multiply this._velocityX to -1 in RTL mode for spring animation, but it's get me an error for prop type require. I spent plenty time to solve this but I'm stuck in it.

also I figure out the index calculated and sent to translateX ( in both rtl and ltr ) calculate multi time and for example when I swipe from index 0 to index 1, base on velocity Its maybe plus two time and the calculate value will be 2 in some time.

Copy link
Collaborator

@osdnk osdnk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@osdnk
Copy link
Collaborator

osdnk commented Apr 12, 2019

or maybe not 🤔

@satya164
Copy link
Owner

@AliAzizi we'll look into it. thanks again for the PR :)

@osdnk osdnk merged commit 839beb4 into satya164:master Apr 12, 2019
@aliakbarazizi
Copy link
Contributor Author

aliakbarazizi commented Apr 12, 2019

Your welcome,
I see the commits and it's worked,
Thanks for improving

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants