             // 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)
+                targetView.center = CGPointMake(targetView.center.x + variation.x * targetView.transform.a, targetView.center.y + variation.y * targetView.transform.a)
                 
                 let velocity = recognizer.velocityInView(targetView)
             }

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

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