mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
skip drawing zero-opacity images for webgl drawer. remove checks for preload in html and canvas drawers since that is done in tiledimage.
This commit is contained in:
parent
921171ed2b
commit
68623ace26
@ -102,7 +102,7 @@ class CanvasDrawer extends $.DrawerBase{
|
|||||||
this._prepareNewFrame(); // prepare to draw a new frame
|
this._prepareNewFrame(); // prepare to draw a new frame
|
||||||
|
|
||||||
for(const tiledImage of tiledImages){
|
for(const tiledImage of tiledImages){
|
||||||
if (tiledImage.opacity !== 0 || tiledImage._preload) {
|
if (tiledImage.opacity !== 0) {
|
||||||
this._drawTiles(tiledImage);
|
this._drawTiles(tiledImage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ class HTMLDrawer extends $.DrawerBase{
|
|||||||
var _this = this;
|
var _this = this;
|
||||||
this._prepareNewFrame(); // prepare to draw a new frame
|
this._prepareNewFrame(); // prepare to draw a new frame
|
||||||
tiledImages.forEach(function(tiledImage){
|
tiledImages.forEach(function(tiledImage){
|
||||||
if (tiledImage.opacity !== 0 || tiledImage._preload) {
|
if (tiledImage.opacity !== 0) {
|
||||||
_this._drawTiles(tiledImage);
|
_this._drawTiles(tiledImage);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -222,7 +222,7 @@
|
|||||||
|
|
||||||
let tilesToDraw = tiledImage.getTilesToDraw();
|
let tilesToDraw = tiledImage.getTilesToDraw();
|
||||||
|
|
||||||
if(tilesToDraw.length === 0){
|
if(tilesToDraw.length === 0 || tiledImage.getOpacity() === 0){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let firstTile = tilesToDraw[0];
|
let firstTile = tilesToDraw[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user