From 00f3f2cfb3693f910a34c1537e5022590c14bda6 Mon Sep 17 00:00:00 2001 From: Benjamin Eidelman Date: Fri, 15 Aug 2014 13:12:41 -0300 Subject: [PATCH] round lens position to avoid border flickering --- jquery.elevatezoom.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.elevatezoom.js b/jquery.elevatezoom.js index 6d1f3ae..0932c0b 100755 --- a/jquery.elevatezoom.js +++ b/jquery.elevatezoom.js @@ -671,8 +671,8 @@ if ( typeof Object.create !== 'function' ) { if(self.options.showLens) { // self.showHideLens("show"); //set background position of lens - self.lensLeftPos = String(self.mouseLeft - self.zoomLens.width() / 2); - self.lensTopPos = String(self.mouseTop - self.zoomLens.height() / 2); + self.lensLeftPos = String(Math.floor(self.mouseLeft - self.zoomLens.width() / 2)); + self.lensTopPos = String(Math.floor(self.mouseTop - self.zoomLens.height() / 2)); }