mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
move logic about zero opacity case into getDrawArea
This commit is contained in:
parent
84a55968ee
commit
921171ed2b
@ -1020,9 +1020,14 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
|
||||
/**
|
||||
* Get the region of this tiled image that falls within the viewport.
|
||||
* @returns {OpenSeadragon.Rect} the region of this tiled image that falls within the viewport.
|
||||
* Returns false for images with opacity==0 unless preload==true
|
||||
*/
|
||||
getDrawArea: function(){
|
||||
|
||||
if( this._opacity === 0 && !this._preload){
|
||||
return false;
|
||||
}
|
||||
|
||||
var drawArea = this._viewportToTiledImageRectangle(
|
||||
this.viewport.getBoundsWithMargins(true));
|
||||
|
||||
@ -1434,7 +1439,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
|
||||
let lowestLevel = tiles.length ? tiles[0].level : 0;
|
||||
|
||||
let drawArea = this.getDrawArea();
|
||||
if(!drawArea || (this._opacity === 0 && !this._preload)){
|
||||
if(!drawArea){
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user