From 753142e099248bc92aa6f4c95c8a15d96eed0cca Mon Sep 17 00:00:00 2001 From: Bernhard Pottler Date: Sat, 9 Oct 2021 17:25:32 +0200 Subject: [PATCH] Add base to parseInt --- src/pig.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pig.js b/src/pig.js index 7d1fba1..7c22b5f 100644 --- a/src/pig.js +++ b/src/pig.js @@ -503,8 +503,8 @@ // This is NOT DOM manipulation. img.style = { - width: parseInt(imageWidth), - height: parseInt(rowHeight), + width: parseInt(imageWidth, 10), + height: parseInt(rowHeight, 10), translateX: translateX, translateY: translateY, transition: transition @@ -519,7 +519,7 @@ // Reset our state variables for next row. row = []; rowAspectRatio = 0; - translateY += parseInt(rowHeight) + this.settings.spaceBetweenImages; + translateY += parseInt(rowHeight, 10) + this.settings.spaceBetweenImages; translateX = 0; } }.bind(this));