Skip to content

Commit

Permalink
fix: #10 Swipe down to close moves image to the left side
Browse files Browse the repository at this point in the history
  • Loading branch information
llr101 committed Jun 12, 2023
1 parent 9cc9888 commit 44d5614
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/imageViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ const ImageViewer = forwardRef<ImageViewerRef, ImageViewerProps>((props, ref) =>
translateX:
manualLeft -
(screenDimensions.width + IMAGE_SPACE) * activeIndexValue +
(screenDimensions.width - manualWidth) / 2 +
(((activeLayoutValue?.pageX || 0) - manualLeft) * closeRateValue) / imageScaleValue +
(imagePosition -
1 +
Expand Down

0 comments on commit 44d5614

Please sign in to comment.