             scrollView.contentOffset.x = scrollView.contentSize.width - scrollView.bounds.size.width
         }
     }
+    
+    private func reset() {
+        scrollView.transform = CGAffineTransformIdentity
+        scrollView.minimumZoomScale = 1
+        scrollView.zoomScale = 1
+    }
 }
 
 private class PhotoScrollView: UIScrollView {

    
    override var frame: CGRect {
        didSet {
            calculateFrames()
        }
    }
    

            return
        }
        
        // scale the image
        cropSize = CGSize(
            width: bounds.size.width,
