From 44d5614444bda207f28fe0072f3e425af8c83bfd Mon Sep 17 00:00:00 2001 From: liulirui Date: Mon, 12 Jun 2023 22:18:10 +0800 Subject: [PATCH] fix: #10 Swipe down to close moves image to the left side --- src/components/imageViewer.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/imageViewer.tsx b/src/components/imageViewer.tsx index 502356e..083989f 100644 --- a/src/components/imageViewer.tsx +++ b/src/components/imageViewer.tsx @@ -156,6 +156,7 @@ const ImageViewer = forwardRef((props, ref) => translateX: manualLeft - (screenDimensions.width + IMAGE_SPACE) * activeIndexValue + + (screenDimensions.width - manualWidth) / 2 + (((activeLayoutValue?.pageX || 0) - manualLeft) * closeRateValue) / imageScaleValue + (imagePosition - 1 +