From 3f21f84df436fde7bbd435a8602856ceea0f9d8e Mon Sep 17 00:00:00 2001 From: Tom Date: Fri, 9 Feb 2024 18:16:30 -0500 Subject: [PATCH] clean up code added for testing --- src/canvasdrawer.js | 4 +--- src/webgldrawer.js | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/canvasdrawer.js b/src/canvasdrawer.js index 2ec6b17b..6a00a294 100644 --- a/src/canvasdrawer.js +++ b/src/canvasdrawer.js @@ -402,9 +402,7 @@ class CanvasDrawer extends OpenSeadragon.DrawerBase{ this._drawRectangle(placeholderRect, fillStyle, useSketch); } - if(!window.draw){ - lastDrawn = []; - } + var subPixelRoundingRule = determineSubPixelRoundingRule(tiledImage.subPixelRoundingForTransparency); var shouldRoundPositionAndSize = false; diff --git a/src/webgldrawer.js b/src/webgldrawer.js index d8b33f93..ac450b3c 100644 --- a/src/webgldrawer.js +++ b/src/webgldrawer.js @@ -242,10 +242,7 @@ if ( tiledImage.placeholderFillStyle && tiledImage._hasOpaqueTile === false ) { this._drawPlaceholder(tiledImage); } - this._drawPlaceholder(tiledImage); - if(!window.draw){ - return; - } + if(tilesToDraw.length === 0 || tiledImage.getOpacity() === 0){ return; }