Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Feconf #361

Merged
merged 11 commits into from
Oct 30, 2020
5 changes: 3 additions & 2 deletions packages/PinchZoom/PinchZoom.example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export function ImageSlider({ imageSources = images }:{ imageSources?: ImageSour

if (moveNext && currentIndex < imageSources.length - 1 && targetTranslate) {
Animated.timing(targetTranslate, {
toValue: { x: -WIDTH, y: animValues.y },
toValue: { x: -(animValues.scale + 1) / 2 * WIDTH, y: animValues.y },
useNativeDriver: true,
duration: 300,
}).start(() => {
Expand All @@ -149,7 +149,7 @@ export function ImageSlider({ imageSources = images }:{ imageSources?: ImageSour
});
} else if (movePrev && currentIndex > 0 && targetTranslate) {
Animated.timing(targetTranslate, {
toValue: { x: WIDTH, y: animValues.y },
toValue: { x: (animValues.scale + 1) / 2 * WIDTH, y: animValues.y },
useNativeDriver: true,
duration: 300,
}).start(() => {
Expand Down Expand Up @@ -213,6 +213,7 @@ export function ImageSlider({ imageSources = images }:{ imageSources?: ImageSour
translateOtherImages();
}}
onRelease={onRelease}
fixOverflowAfterRelease={false}
style={{
width: WIDTH,
justifyContent: 'center',
Expand Down
Loading