diff --git a/src/canvasdrawer.js b/src/canvasdrawer.js index f6f37708..ad7ea957 100644 --- a/src/canvasdrawer.js +++ b/src/canvasdrawer.js @@ -143,10 +143,12 @@ class CanvasDrawer extends OpenSeadragon.DrawerBase{ } /** + * @param {TiledImage} tiledImage the tiled image that is calling the function * @returns {Boolean} Whether this drawer requires enforcing minimum tile overlap to avoid showing seams. + * @private */ - minimumOverlapRequired() { - return true; + minimumOverlapRequired(tiledImage) { + return true; } diff --git a/src/drawerbase.js b/src/drawerbase.js index 0a0d04ce..083aba79 100644 --- a/src/drawerbase.js +++ b/src/drawerbase.js @@ -141,12 +141,13 @@ OpenSeadragon.DrawerBase = class DrawerBase{ } /** + * @param {TiledImage} tiledImage the tiled image that is calling the function * @returns {Boolean} Whether this drawer requires enforcing minimum tile overlap to avoid showing seams. * @private */ - minimumOverlapRequired() { + minimumOverlapRequired(tiledImage) { return false; - } + } /** diff --git a/src/htmldrawer.js b/src/htmldrawer.js index 80f851e4..8b2a9305 100644 --- a/src/htmldrawer.js +++ b/src/htmldrawer.js @@ -86,11 +86,13 @@ class HTMLDrawer extends OpenSeadragon.DrawerBase{ } /** + * @param {TiledImage} tiledImage the tiled image that is calling the function * @returns {Boolean} Whether this drawer requires enforcing minimum tile overlap to avoid showing seams. + * @private */ - minimumOverlapRequired() { + minimumOverlapRequired(tiledImage) { return true; - } + } /** * create the HTML element (e.g. canvas, div) that the image will be drawn into diff --git a/src/tiledimage.js b/src/tiledimage.js index 20fa2ebf..0372b8be 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -1706,7 +1706,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag tileCenter = positionT.plus( sizeT.divide( 2 ) ), tileSquaredDistance = viewportCenter.squaredDistanceTo( tileCenter ); - if(this.viewer.drawer.minimumOverlapRequired()){ + if(this.viewer.drawer.minimumOverlapRequired(this)){ if ( !overlap ) { sizeC = sizeC.plus( new $.Point(1, 1)); } diff --git a/src/webgldrawer.js b/src/webgldrawer.js index d36a7b74..e9f3633d 100644 --- a/src/webgldrawer.js +++ b/src/webgldrawer.js @@ -210,6 +210,16 @@ return 'webgl'; } + /** + * @param {TiledImage} tiledImage the tiled image that is calling the function + * @returns {Boolean} Whether this drawer requires enforcing minimum tile overlap to avoid showing seams. + * @private + */ + minimumOverlapRequired(tiledImage) { + // return true if the tiled image is tainted, since the backup canvas drawer will be used. + return tiledImage.isTainted(); + } + /** * create the HTML element (canvas in this case) that the image will be drawn into * @private