From 2b1f680a9c5d7dea8fbbab1f4a4ebba1e959c3d7 Mon Sep 17 00:00:00 2001 From: ShaMan123 Date: Mon, 4 Apr 2022 15:55:47 +0300 Subject: [PATCH] remove redundant logic --- src/shapes/group.class.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/shapes/group.class.js b/src/shapes/group.class.js index e8e38e5fc80..bfc10358c6d 100644 --- a/src/shapes/group.class.js +++ b/src/shapes/group.class.js @@ -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,