Skip to content

Commit

Permalink
Fix RTL
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelbabenko committed Jul 30, 2024
1 parent 6a56cd6 commit 9e66827
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ const ResizableImage = React.memo(
zIndex: index === currentIndex.value ? 1 : 0,
transform: [
{
translateX: (width + emptySpaceWidth) * index,
translateX: getPosition(rtl ? index : -index),
},
],
};
Expand All @@ -859,8 +859,8 @@ const ResizableImage = React.memo(
translateX:
offset.x.value +
translation.x.value -
(isNextForLast ? getPosition(length) : 0) +
(isPrevForFirst ? getPosition(length) : 0),
(isNextForLast ? getPosition(rtl ? -length : length) : 0) +
(isPrevForFirst ? getPosition(rtl ? -length : length) : 0),
},
{ translateY: offset.y.value + translation.y.value },
{ scale: scale.value },
Expand Down

0 comments on commit 9e66827

Please sign in to comment.