From 0c2c506d8899ecd9f397476e48e8033261153b18 Mon Sep 17 00:00:00 2001 From: Jasper Staab Date: Wed, 19 Feb 2020 15:10:25 -1000 Subject: [PATCH] apply pixelDensityRatio after flip --- src/tiledimage.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tiledimage.js b/src/tiledimage.js index 9c2fc4ed..046d86f8 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -1929,14 +1929,15 @@ function drawTiles( tiledImage, lastDrawn ) { // sketch canvas we are going to use for performance reasons. bounds = tiledImage.viewport.viewportToViewerElementRectangle( tiledImage.getClippedBounds(true)) - .getIntegerBoundingBox() - .times($.pixelDensityRatio); + .getIntegerBoundingBox(); if(tiledImage._drawer.viewer.viewport.getFlip()) { if (tiledImage.viewport.degrees !== 0 || tiledImage.getRotation(true) % 360 !== 0){ bounds.x = tiledImage._drawer.viewer.container.clientWidth - (bounds.x + bounds.width); } } + + bounds = bounds.times($.pixelDensityRatio); } tiledImage._drawer._clear(true, bounds); }