mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-18 10:31:08 +00:00
Merge pull request #1868 from asturur/group-init
Use object's set and initializa methods in group
This commit is contained in:
commit
c814bd9727
1 changed files with 2 additions and 7 deletions
|
|
@ -69,9 +69,7 @@
|
||||||
this._calcBounds();
|
this._calcBounds();
|
||||||
this._updateObjectsCoords();
|
this._updateObjectsCoords();
|
||||||
|
|
||||||
if (options) {
|
this.callSuper('initialize', options);
|
||||||
extend(this, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setCoords();
|
this.setCoords();
|
||||||
this.saveCoords();
|
this.saveCoords();
|
||||||
|
|
@ -199,14 +197,11 @@
|
||||||
_set: function(key, value) {
|
_set: function(key, value) {
|
||||||
if (key in this.delegatedProperties) {
|
if (key in this.delegatedProperties) {
|
||||||
var i = this._objects.length;
|
var i = this._objects.length;
|
||||||
this[key] = value;
|
|
||||||
while (i--) {
|
while (i--) {
|
||||||
this._objects[i].set(key, value);
|
this._objects[i].set(key, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
this.callSuper('_set', key, value);
|
||||||
this[key] = value;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue