From cac7052bf850b185bd4e2e49a2c75c6592f228d4 Mon Sep 17 00:00:00 2001 From: Antoine Vandecreme Date: Thu, 28 Apr 2016 11:26:09 -0400 Subject: [PATCH] Take pixelDensityRatio into account. --- src/tiledimage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tiledimage.js b/src/tiledimage.js index 67c2a7f3..ed5f9443 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -1454,7 +1454,9 @@ function drawTiles( tiledImage, lastDrawn ) { // Except when edge smoothing, we only clean the part of the // sketch canvas we are going to use for performance reasons. bounds = tiledImage.viewport.viewportToViewerElementRectangle( - tiledImage.getClippedBounds(true)).getIntegerBoundingBox(); + tiledImage.getClippedBounds(true)) + .getIntegerBoundingBox() + .times($.pixelDensityRatio); } tiledImage._drawer._clear(true, bounds); }