From 23cba35ea0a9a93e21b249a59f97105230d06c1e Mon Sep 17 00:00:00 2001 From: larissasmith Date: Thu, 18 May 2017 15:17:02 -0600 Subject: [PATCH] Clamp device pixel ratio to a minimum of 1 for calculating pixelDensityRatio. A lower value can cause tile drawing issues. --- src/openseadragon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openseadragon.js b/src/openseadragon.js index a470de14..ca81739c 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -880,7 +880,7 @@ function OpenSeadragon( options ){ context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1; - return devicePixelRatio / backingStoreRatio; + return Math.max(devicePixelRatio, 1) / backingStoreRatio; } else { return 1; }