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:
Tom 2024-02-01 10:46:45 -05:00
parent 921171ed2b
commit 68623ace26
4 changed files with 4 additions and 4 deletions

View File

@ -102,7 +102,7 @@ class CanvasDrawer extends $.DrawerBase{
this._prepareNewFrame(); // prepare to draw a new frame
for(const tiledImage of tiledImages){
if (tiledImage.opacity !== 0 || tiledImage._preload) {
if (tiledImage.opacity !== 0) {
this._drawTiles(tiledImage);
}
}

View File

@ -89,7 +89,7 @@ class HTMLDrawer extends $.DrawerBase{
var _this = this;
this._prepareNewFrame(); // prepare to draw a new frame
tiledImages.forEach(function(tiledImage){
if (tiledImage.opacity !== 0 || tiledImage._preload) {
if (tiledImage.opacity !== 0) {
_this._drawTiles(tiledImage);
}
});

View File

@ -222,7 +222,7 @@
let tilesToDraw = tiledImage.getTilesToDraw();
if(tilesToDraw.length === 0){
if(tilesToDraw.length === 0 || tiledImage.getOpacity() === 0){
return;
}
let firstTile = tilesToDraw[0];

View File

@ -1,5 +1,5 @@
const sources = {
"rainbow": "../data/testpattern.dzi",
"rainbow":"../data/testpattern.dzi",
"leaves":"../data/iiif_2_0_sizes/info.json",
"bblue":{
type:'image',