     }
     
     private func configureZoomScales() {
-        guard let image = image else { return }
+        guard let image = image else {
+            return
+        }
         
         // get scales needed to perfectly fit the image
         let xScale = bounds.size.width / image.size.width

        let minOffset = width - bounds.width
        if xOffset < minOffset {
            let diff = minOffset - xOffset
            let newOffset = CGPoint(x: width + minOffset - diff, y: 0)
            UIView.performWithoutAnimation {
                setContentOffset(newOffset, animated: false)
            }

    
    private func prepareToResize() {
        let boundsCenter = CGPoint(x: bounds.midX, y: bounds.midY)
        pointToCenterAfterResize = convert(boundsCenter, to: stackView)
    }
    
    private func recoverFromResizing() {
