mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-08 08:21:00 +00:00
update cache automatically in _set()
This commit is contained in:
parent
ab67a7d1d6
commit
c8da9fbfc3
1 changed files with 18 additions and 0 deletions
|
|
@ -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;
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue