From 578ff36a065264246e8f29be963b238ed05209e8 Mon Sep 17 00:00:00 2001 From: Yochay Doutsh Date: Wed, 6 Feb 2019 16:04:33 +0200 Subject: [PATCH] WIP: _calculateCanvasSize outputs are floored, but imageSmoothingEnabled is still initalized on resize --- src/drawer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/drawer.js b/src/drawer.js index 614e6cbe..5a70bb1e 100644 --- a/src/drawer.js +++ b/src/drawer.js @@ -686,8 +686,9 @@ $.Drawer.prototype = { var pixelDensityRatio = $.pixelDensityRatio; var viewportSize = this.viewport.getContainerSize(); return { - x: viewportSize.x * pixelDensityRatio, - y: viewportSize.y * pixelDensityRatio + // canvas width and height are integers + x: Math.floor(viewportSize.x * pixelDensityRatio), + y: Math.floor(viewportSize.y * pixelDensityRatio) }; },