nuclearpasta / react-native-drax

A drag-and-drop system for React Native
MIT License
554 stars 69 forks source link

RTL support? #149

Open jonasbetareader opened 2 years ago

jonasbetareader commented 2 years ago

Hello!

I've been using react-native-drax for a project, and really enjoy it. However, now some users are requesting to use the app in RTL languages, and when I tried switching the direction at root level (using I18nManager.forceRTL(true);), it seems like the position of the dragged element doesn't "honor" the RTL direction (e.g. when I drag an element on the left side of the screen (previously the right side), its "dragged twin" appears not where my finger is, but on the far right of the screen). See screenshots below.

RTL behavior (finger actually pressing on Mm's original position in the left of the screen): IMG_5516

LTR behavior (Mm appearing right below my pressed finger): IMG_1B7D2E3F81D3-1

lafiosca commented 2 years ago

Wow, that's a very cool and interesting use case! Unfortunately I am completely unfamiliar with RTL implementations. I assume some additional logic/math would need to be added around the hover view absolute positioning to honor the RTL setting. To me this seems like a feature request, but again unfortunately, I am not actively developing on this library at this time. I have tagged the issue as help wanted and will leave it open.

HaidarZ commented 7 months ago

@jonasbetareader did you manage to add RTL support ?