Skip to content

Commit

Permalink
Merge branch 'v6-group-patch2' into v6-fix-nested-controls
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed Apr 4, 2022
2 parents 905b2de + d53d6b6 commit 5e286aa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/shapes/group.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
* @param {Number} index Index to insert object at
*/
insertAt: function (objects, index) {
fabric.Collection.insertAt.call(this, objects, index, this._onObjectAdded);
fabric.Collection.insertAt.call(this, objects, index, this._onObjectAdded);
this._onAfterObjectsChange('added', Array.isArray(objects) ? objects : [objects]);
},

Expand Down Expand Up @@ -223,8 +223,8 @@
/**
* Checks if object can enter group and logs relevant warnings
* @private
* @param {fabric.Object} object
* @returns
* @param {fabric.Object} object
* @returns
*/
canEnter: function (object) {
if (object === this) {
Expand Down
1 change: 1 addition & 0 deletions test/unit/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@
var group = makeGroupWith2ObjectsWithOpacity();

var groupObject = group.toObject();
groupObject.subTargetCheck = true;

fabric.Group.fromObject(groupObject).then(function(newGroupFromObject) {
assert.ok(newGroupFromObject._objects[0].lineCoords.tl, 'acoords 0 are restored');
Expand Down
4 changes: 2 additions & 2 deletions test/unit/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -883,8 +883,8 @@
add: function () {
fabric.Collection.add.call(this, arguments, this._onObjectAdded);
},
insertAt: function (objects, index, nonSplicing) {
fabric.Collection.insertAt.call(this, objects, index, nonSplicing, this._onObjectAdded);
insertAt: function (objects, index) {
fabric.Collection.insertAt.call(this, objects, index, this._onObjectAdded);
},
remove: function () {
fabric.Collection.remove.call(this, arguments, this._onObjectRemoved);
Expand Down

0 comments on commit 5e286aa

Please sign in to comment.