Compare commits

...

3 Commits

Author SHA1 Message Date
Ian Gilman
995be3c37c Changelog for #2162 2022-05-18 15:39:02 -07:00
Ian Gilman
15ef58a8f5
Merge pull request #2162 from pearcetm/imagetilesource-bugfix
Bugfix for imagetilesource _freeupCanvasMemory
2022-05-18 15:33:47 -07:00
pearcetm
af26fdbff1
Bugfix for imagetilesource _freeupCanvasMemory 2022-05-18 12:26:19 -04:00
2 changed files with 5 additions and 2 deletions

View File

@ -21,6 +21,7 @@ OPENSEADRAGON CHANGELOG
* Fixed error caused by attaching MouseTracker to the page's document element (#2145 @tdiprima)
* Added fallback and deprecation warning for Viewer.buttons (which got changed to buttonGroup in 3.0.0) (#2153 @devbyjonah)
* Pinch to zoom now zooms around the center of the pinch, rather than the center of the viewer (#2158 @cavenel)
* Fixed an issue that would sometimes cause problems with freeing up ImageTileSource memory (#2162 @pearcetm)
3.0.0:

View File

@ -272,8 +272,10 @@
*/
_freeupCanvasMemory: function () {
for (var i = 0; i < this.levels.length; i++) {
this.levels[i].context2D.canvas.height = 0;
this.levels[i].context2D.canvas.width = 0;
if(this.levels[i].context2D){
this.levels[i].context2D.canvas.height = 0;
this.levels[i].context2D.canvas.width = 0;
}
}
},
});