diff --git a/src/extras/cacheAsBitmap.js b/src/extras/cacheAsBitmap.js index 5dd5640..37e55d2 100644 --- a/src/extras/cacheAsBitmap.js +++ b/src/extras/cacheAsBitmap.js @@ -358,9 +358,12 @@ * Destroys the cached object. * * @private + * @param {object|boolean} [options] - Options parameter. A boolean will act as if all options + * have been set to that value. + * Used when destroying containers, see the Container.destroy method. */ -DisplayObject.prototype._cacheAsBitmapDestroy = function _cacheAsBitmapDestroy() +DisplayObject.prototype._cacheAsBitmapDestroy = function _cacheAsBitmapDestroy(options) { this.cacheAsBitmap = false; - this.destroy(); + this.destroy(options); };