hughjdavey / ngx-stars

Simple stars rating component for Angular >= 2
Creative Commons Zero v1.0 Universal
18 stars 9 forks source link

Selecting a half star in RTL mode #13

Closed Linknpay closed 11 months ago

Linknpay commented 1 year ago

Hello there is an issue with stars in RTL mode. When you select a half star: The half in the left is full and it should be the right half. Please check the picture attached Capture d’écran 2023-02-24 à 17 28 04

Thank you

hughjdavey commented 1 year ago

Hi thanks for raising this issue. I admit I never tested RTL layouts which I should have done. You are welcome to raise a PR if you have the solution? Otherwise I will take a look at this when I get time in the next week or two.

github-sadegh commented 1 year ago

Hi. I have the same issue to use this library in RTL websites. Did you find a solution for this?

hughjdavey commented 1 year ago

Hi @github-sadegh thanks for confirming you have the issue too. I plan to look at it at the weekend.

hughjdavey commented 1 year ago

Hi both I have now released v1.6.5 which has a new @Input boolean rtl. It fixes the half star images and also places the 'zero star' (that you click to set to 0) on the right hand side. But you might need to have the star component in an LTR section for it to work, as it relies on flipping images around, so if it was in a dir="rtl" section it would flip back again to be incorrect.

Please let me know if this is a suitable fix. I am happy to discuss other implementations if that would be better for your use-cases.