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) }; },