Merge pull request #2521 from pearcetm/fix-2519

Fix #2519
This commit is contained in:
Ian Gilman 2024-04-29 10:47:42 -07:00 committed by GitHub
commit f3a942c522
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 22 additions and 7 deletions

View File

@ -144,9 +144,11 @@ 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() {
minimumOverlapRequired(tiledImage) {
return true;
}

View File

@ -141,10 +141,11 @@ 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;
}

View File

@ -86,9 +86,11 @@ 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;
}

View File

@ -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));
}

View File

@ -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