mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
fix placeholder positioning for canvas drawer
This commit is contained in:
parent
d4e82d374e
commit
c734de531f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user