From 02ab1df7215c0eabc8a91e9a8795440d33f66955 Mon Sep 17 00:00:00 2001 From: Michael Henry Date: Fri, 6 Dec 2019 08:37:17 +0900 Subject: [PATCH] don't restrict the x component --- Sources/ImageViewerController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ImageViewerController.swift b/Sources/ImageViewerController.swift index 6105c2e9..f8055ed5 100644 --- a/Sources/ImageViewerController.swift +++ b/Sources/ImageViewerController.swift @@ -165,7 +165,7 @@ class ImageViewerController:UIViewController, UIGestureRecognizerDelegate { let translation: CGPoint = gestureRecognizer .translation(in: view) container.center = CGPoint( - x: container.center.x, + x: lastLocation.x + translation.x, y: lastLocation.y + translation.y) }