Comments (10)
Wonderful. Million thanks to you!
from react-native-image-modal.
Hi @diaazzawi
Thanks for using this library.
Could you share the video about the bug? I can't imagine it 😭
Thanks
from react-native-image-modal.
Thank you so much @dev-yakuza for your prompt response. Here is what I'm experiencing when my simulator's language is Arabic or any other RTL-language:
Thanks
from react-native-image-modal.
Thanks for sharing the video.
If you configure the other language(like English), is it working well? 🤔
from react-native-image-modal.
Yes it works perfectly in other LTR-languages.
Just throwing an idea: It would be AWESOME if you add one more prop (say rtl as boolean) that I can pass to the component and based on its value you'll need to flip the x-coordinate of the last image position.
In the meanwhile, it will be great if you have any temporary workaround.
Thanks!
from react-native-image-modal.
Thanks for your investigation and idea.
I will fix it when I have time!
from react-native-image-modal.
Just found where you need to make the necessary changes: Assuming you add a new boolean prop (isRTL) to your component, the _setOrigin function (lines 69-91) in src\index.tsx file should change to:
private _setOrigin = (): void => {
if (this._root) {
this._root.measureInWindow((x: number, y: number, width: number, height: number) => {
const { isTranslucent, onOpen, isRTL } = this.props;
let newY: number = y;
if (typeof onOpen === 'function') {
onOpen();
}
if (isTranslucent) {
newY += StatusBar.currentHeight ? StatusBar.currentHeight : 0;
StatusBar.setHidden(true);
}
let newX: number = x;
if (isRTL) {
newX = Dimensions.get('window').width - width - x;
}
this.setState({
origin: {
width,
height,
x: newX,
y: newY,
},
});
});
}
};
🎉 🎉 🎉 🥳 🥳 🥳 I tested the app with the above change in both LTR- and RTL-languages and it PERFECTLY works as expected 🥳 🥳 🥳 🎉 🎉 🎉
Please update your library with this change ASAP so I can get it in my project.
Thank you again for this AWESOME lib.
from react-native-image-modal.
Thanks so much to implement it.
Could you make a PR? 🙏 If you make it, I will merge it and release it asap!
Thanks
from react-native-image-modal.
FYI, I just created the above PR.
from react-native-image-modal.
Thanks for your contribution 🙇♂️
I just update the version of the npm package(v2.0.2)
And update the document.
from react-native-image-modal.
Related Issues (20)
- android imageModal does not cover statusBar HOT 3
- Add modalRef open method HOT 4
- i can't interative with custom renderFooter HOT 1
- modalImageStyle doesn't works
- Change Request: replace react-native-fast-image by expo-image HOT 2
- question about performance HOT 1
- Image in modal is blur in Android HOT 7
- Invariant Violation: Tried to register two views with the same name FastImageView HOT 6
- Styling issue for model image HOT 5
- Multiple image slider HOT 3
- Use auto height HOT 3
- modalImageResizeMode not working HOT 3
- Android Only - Images when opened are blurry HOT 1
- Add Dependabot
- Add Linter and GitHub actions
- Add test code
- Change husky and lint-staged to Lefthook
- Add CSpell to check typo
- Add Remark linter to check markdown files
- Add Stylelint
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-image-modal.