fix: avoid crash when setting useCanvas to false

This commit is contained in:
Ronny Valentin Vindenes 2022-02-22 12:31:32 +01:00
parent 51e3ea7fa0
commit 34fd856b4f

View File

@ -2055,7 +2055,7 @@ function drawTiles( tiledImage, lastDrawn ) {
imageZoom > tiledImage.smoothTileEdgesMinZoom && imageZoom > tiledImage.smoothTileEdgesMinZoom &&
!tiledImage.iOSDevice && !tiledImage.iOSDevice &&
tiledImage.getRotation(true) % 360 === 0 && // TODO: support tile edge smoothing with tiled image rotation. tiledImage.getRotation(true) % 360 === 0 && // TODO: support tile edge smoothing with tiled image rotation.
$.supportsCanvas) { $.supportsCanvas && tiledImage.viewer.useCanvas) {
// When zoomed in a lot (>100%) the tile edges are visible. // When zoomed in a lot (>100%) the tile edges are visible.
// So we have to composite them at ~100% and scale them up together. // So we have to composite them at ~100% and scale them up together.
// Note: Disabled on iOS devices per default as it causes a native crash // Note: Disabled on iOS devices per default as it causes a native crash