mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-03-30 12:10:12 +03:00
move logic about zero opacity case into getDrawArea
This commit is contained in:
parent
84a55968ee
commit
921171ed2b
2 changed files with 7 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue