update cache automatically in _set()

This commit is contained in:
GordoRank 2014-01-23 10:07:33 +00:00
parent ab67a7d1d6
commit c8da9fbfc3

View file

@ -884,6 +884,24 @@
}
this[key] = value;
if (this.canvas && this.canvas.turbo) {
if (key !== 'left' &&
key !== 'top' &&
key !== 'scaleX' &&
key !== 'scaleY' &&
key !== 'width' &&
key !== 'height' &&
key !== 'angle' ||
!this.active){
if (this.canvas._isCacheable(this)) {
this.width = this.getWidth();
this.height = this.getHeight();
}
this.updateCache();
}
}
return this;
},