Merge pull request #2468 from thec0keman/fix-this-scoping

Fix `this` scoping
This commit is contained in:
Ian Gilman 2024-02-12 09:52:01 -08:00 committed by GitHub
commit 4c331a2000
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -1456,7 +1456,7 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
lowestLevel lowestLevel
); );
_this._isBlending = _this._isBlending || tileIsBlending; _this._isBlending = _this._isBlending || tileIsBlending;
_this._needsDraw = _this._needsDraw || tileIsBlending || this._wasBlending; _this._needsDraw = _this._needsDraw || tileIsBlending || _this._wasBlending;
} }
} }

View File

@ -261,7 +261,7 @@ $.extend( $.World.prototype, $.EventSource.prototype, /** @lends OpenSeadragon.W
draw: function() { draw: function() {
this.viewer.drawer.draw(this._items); this.viewer.drawer.draw(this._items);
this._needsDraw = false; this._needsDraw = false;
this._items.forEach(function(item){ this._items.forEach((item) => {
this._needsDraw = item.setDrawn() || this._needsDraw; this._needsDraw = item.setDrawn() || this._needsDraw;
}); });
}, },