removed with dims (#4453)

This commit is contained in:
Andrea Bogazzi 2017-11-12 15:18:28 +01:00 committed by GitHub
parent 61c415be26
commit d65b5dd5a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -990,7 +990,7 @@
this.drawCacheOnCanvas(ctx);
}
else {
this._cacheCanvas = null;
this._removeCacheCanvas();
this.dirty = false;
this.drawObject(ctx);
if (this.objectCaching && this.statefullCache) {
@ -1001,6 +1001,15 @@
ctx.restore();
},
/**
* Remove cacheCanvas and its dimensions from the objects
*/
_removeCacheCanvas: function() {
this._cacheCanvas = null;
this.cacheWidth = 0;
this.cacheHeight = 0;
},
/**
* When set to `true`, force the object to have its own cache, even if it is inside a group
* it may be needed when your object behave in a particular way on the cache and always needs