added destroy and clear methods to resolve tile caching issue

This commit is contained in:
Martin Pluta 2015-02-20 21:12:34 +01:00
parent 4a3899e394
commit cfd2693fc7
2 changed files with 4 additions and 1 deletions

View File

@ -673,7 +673,8 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
THIS[ this.hash ].animating = false;
this.world.removeAll();
this.imageLoader.clear();
/**
* Raised when the viewer is closed (see {@link OpenSeadragon.Viewer#close}).
*

View File

@ -183,6 +183,7 @@ $.extend( $.World.prototype, $.EventSource.prototype, /** @lends OpenSeadragon.W
}
item.removeHandler('bounds-change', this._delegatedFigureSizes);
item.destroy();
this._items.splice( index, 1 );
this._figureSizes();
this._needsDraw = true;
@ -199,6 +200,7 @@ $.extend( $.World.prototype, $.EventSource.prototype, /** @lends OpenSeadragon.W
for (var i = 0; i < this._items.length; i++) {
item = this._items[i];
item.removeHandler('bounds-change', this._delegatedFigureSizes);
item.destroy();
}
var removedItems = this._items;