Skip to content

Commit

Permalink
make cacheCanvas created on the fly if needed (#3706)
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur authored Feb 16, 2017
1 parent d058307 commit ff0b6f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/shapes/object.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,9 @@
}
this.clipTo && fabric.util.clipContext(this, ctx);
if (this.objectCaching && (!this.group || this.needsItsOwnCache)) {
if (!this._cacheCanvas) {
this._createCacheCanvas();
}
if (this.isCacheDirty(noTransform)) {
this.statefullCache && this.saveState({ propertySet: 'cacheProperties' });
this.drawObject(this._cacheContext, noTransform);
Expand Down

0 comments on commit ff0b6f0

Please sign in to comment.