                     }, completion: { (_) -> Void in
                         self.close()
                     })
+                } else if targetView.transform.a > 1.0 {
+                    // do nothing
                 } else {
                     self.moveImageToCenter()
                 }

            // Move target view
            if let targetView = recognizer.view {
                let variation = recognizer.translationInView(targetView)
                targetView.center = CGPointMake(targetView.center.x + variation.x, targetView.center.y + variation.y)
                
                let velocity = recognizer.velocityInView(targetView)
            }

                self.imageView.frame.size = CGSizeMake(width, height)
                self.imageView.center = self.window.center
                }) { (_) -> Void in
                    self.imageView.bounds.size = self.imageView.frame.size
                    self.imageView.transform = CGAffineTransformMakeScale(1, 1)
            }
        }
    }
