diff --git a/js/zoom.js b/js/zoom.js index 31d8b0a..0d3dabc 100755 --- a/js/zoom.js +++ b/js/zoom.js @@ -183,9 +183,9 @@ var imageCenterY = imageOffset.top + (this._targetImage.height / 2) var imageCenterX = imageOffset.left + (this._targetImage.width / 2) - - this._translateY = viewportY - imageCenterY - this._translateX = viewportX - imageCenterX + + this._translateY = Math.round(viewportY - imageCenterY) + this._translateX = Math.round(viewportX - imageCenterX) $(this._targetImage).css('transform', 'scale(' + this._imgScaleFactor + ')') $(this._targetImageWrap).css('transform', 'translate(' + this._translateX + 'px, ' + this._translateY + 'px) translateZ(0)')