Clamp device pixel ratio to a minimum of 1 for calculating pixelDensityRatio.

A lower value can cause tile drawing issues.
This commit is contained in:
larissasmith 2017-05-18 15:17:02 -06:00
parent b941864ac5
commit 23cba35ea0

View File

@ -880,7 +880,7 @@ function OpenSeadragon( options ){
context.msBackingStorePixelRatio || context.msBackingStorePixelRatio ||
context.oBackingStorePixelRatio || context.oBackingStorePixelRatio ||
context.backingStorePixelRatio || 1; context.backingStorePixelRatio || 1;
return devicePixelRatio / backingStoreRatio; return Math.max(devicePixelRatio, 1) / backingStoreRatio;
} else { } else {
return 1; return 1;
} }