react-image-lightbox icon indicating copy to clipboard operation
react-image-lightbox copied to clipboard

RTL support

Open alaatm opened this issue 5 years ago • 0 comments

When using this in an RTL website and when the width of the image is larger than the window width, the translate3d css will position the image incorrectly offscren.

I suggest adding a rtl boolean property to the component to correct calculate the x argument of translate3d. Basically it just needs to be multiplied by -1.

Below image show the incorrectly positioned image: 1

When changing translate3d(-297px, 0px, 0px) to translate3d(297px, 0px, 0px) then the image will correctly be centered: 2

alaatm avatar Jan 22 '19 13:01 alaatm