     }
     
     public func zoomIn(point: CGPoint, scale: CGFloat, animated: Bool = true) {
-        let imageZoomRect = frame.size.width / scale
+        let imageZoomRect = imageView.frame.size.width / scale
         zoomIn(rect: CGRect(x: point.x - imageZoomRect / 2, y: point.y - imageZoomRect / 2, width: imageZoomRect, height: imageZoomRect), animated: animated)
     }
     

    
    internal let imageView = UIImageView()
    private let scrollImg = UIScrollView()
    
    public func setup(image: UIImage) {
        self.image = image

    
    override public func layoutSubviews() {
        if !isZoomed() {
            imageView.frame = bounds.inset(by: imageViewInset)
            scrollImg.frame.size = self.frame.size
        }
    }
