Skip to content

Commit 372e5ee

Browse files
authored
fix: regression due to scaleX for individual images (#3261)
1 parent 1ae2f7d commit 372e5ee

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package/src/components/ImageGallery/ImageGallery.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ export const ImageGallery = (props: Props) => {
378378
);
379379

380380
/**
381-
* This transition and scaleX reverse lets use scroll left
381+
* This transition and scaleX reverse lets use scroll right
382382
*/
383383
const pagerStyle = useAnimatedStyle<ImageStyle>(
384384
() => ({

package/src/components/ImageGallery/hooks/useAnimatedGalleryStyle.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,17 @@ export const useAnimatedGalleryStyle = ({
5959
{
6060
scale: selected ? scale.value / 8 : oneEighth,
6161
},
62-
{ scaleX: -1 },
62+
{ scaleX: 1 },
6363
],
6464
};
6565
}, [previous, selected]);
6666

6767
const animatedStyles = useAnimatedStyle(() => {
68-
const xScaleOffset = -7 * screenWidth * (0.5 + index);
68+
const xScaleOffset = 7 * screenWidth * (0.5 + index);
6969
const yScaleOffset = -screenHeight * 3.5;
7070
return {
7171
transform: [
72-
{ scaleX: -1 },
72+
{ scaleX: 1 },
7373
{ translateY: yScaleOffset },
7474
{
7575
translateX: -xScaleOffset,

0 commit comments

Comments
 (0)