diff --git a/src/canvasdrawer.js b/src/canvasdrawer.js index d4ec6231..2ec6b17b 100644 --- a/src/canvasdrawer.js +++ b/src/canvasdrawer.js @@ -382,9 +382,9 @@ class CanvasDrawer extends OpenSeadragon.DrawerBase{ } usedClip = true; } - + tiledImage._hasOpaqueTile = false; if ( tiledImage.placeholderFillStyle && tiledImage._hasOpaqueTile === false ) { - var placeholderRect = this.viewportToDrawerRectangle(tiledImage.getBounds(true)); + let placeholderRect = this.viewportToDrawerRectangle(tiledImage.getBoundsNoRotate(true)); if (sketchScale) { placeholderRect = placeholderRect.times(sketchScale); } @@ -392,7 +392,7 @@ class CanvasDrawer extends OpenSeadragon.DrawerBase{ placeholderRect = placeholderRect.translate(sketchTranslate); } - var fillStyle = null; + let fillStyle = null; if ( typeof tiledImage.placeholderFillStyle === "function" ) { fillStyle = tiledImage.placeholderFillStyle(tiledImage, this.context); } @@ -402,7 +402,9 @@ class CanvasDrawer extends OpenSeadragon.DrawerBase{ this._drawRectangle(placeholderRect, fillStyle, useSketch); } - + if(!window.draw){ + lastDrawn = []; + } var subPixelRoundingRule = determineSubPixelRoundingRule(tiledImage.subPixelRoundingForTransparency); var shouldRoundPositionAndSize = false;