diff --git a/source/UI/js/Image/ImageViewer.js b/source/UI/js/Image/ImageViewer.js index 70fe79d2..d95db5cd 100644 --- a/source/UI/js/Image/ImageViewer.js +++ b/source/UI/js/Image/ImageViewer.js @@ -311,10 +311,10 @@ Ox.ImageViewer = function(options, self) { : self.options.width / self.options.imageWidth; } return [ - Math.max(center[0] - self.options.width / 2 * zoom, 0), - Math.max(center[1] - self.options.height / 2 * zoom, 0), - Math.min(center[0] + self.options.width / 2 * zoom, self.options.imageWidth), - Math.min(center[1] + self.options.height / 2 * zoom, self.options.imageHeight) + Math.max(center[0] - self.options.width / 2 / zoom, 0), + Math.max(center[1] - self.options.height / 2 / zoom, 0), + Math.min(center[0] + self.options.width / 2 / zoom, self.options.imageWidth), + Math.min(center[1] + self.options.height / 2 / zoom, self.options.imageHeight) ]; }