From 27182e47bd80d70a9f9151da6f36b919e57f92c3 Mon Sep 17 00:00:00 2001 From: Antti Hukkanen Date: Tue, 20 Oct 2015 20:23:21 +0300 Subject: [PATCH] Fixes a styling issue This commit fixes a styling issue in Google Chrome (and probably other webkit based browsers) in case the calculation returns uneven numbers. --- js/jquery.twentytwenty.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/jquery.twentytwenty.js b/js/jquery.twentytwenty.js index c9eccf9..aa9baf4 100644 --- a/js/jquery.twentytwenty.js +++ b/js/jquery.twentytwenty.js @@ -33,8 +33,8 @@ return { w: w+"px", h: h+"px", - cw: (dimensionPct*w)+"px", - ch: (dimensionPct*h)+"px" + cw: Math.round(dimensionPct*w)+"px", + ch: Math.round(dimensionPct*h)+"px" }; };