Skip to content

Commit

Permalink
remove redundant logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed Apr 4, 2022
1 parent 5e3fc1f commit 2b1f680
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/shapes/group.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,9 @@
this.__objectSelectionDisposer = this.__objectSelectionMonitor.bind(this, false);
this._firstLayoutDone = false;
this.callSuper('initialize', options);
if (objectsRelativeToGroup) {
this.forEachObject(function (object) {
this.enterGroup(object, false);
}, this);
}
else {
// we need to preserve object's center point in relation to canvas and apply group's transform to it
var inv = invertTransform(this.calcTransformMatrix());
this.forEachObject(function (object) {
this.enterGroup(object, false);
var center = transformPoint(object.getCenterPoint(), inv);
object.setPositionByOrigin(center, 'center', 'center');
}, this);
}
this.forEachObject(function (object) {
this.enterGroup(object, false);
}, this);
this._applyLayoutStrategy({
type: 'initialization',
options: options,
Expand Down

0 comments on commit 2b1f680

Please sign in to comment.