fabric 6.0.0-beta11 → 6.0.0-beta12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [next]
4
4
 
5
+ ## [6.0.0-beta12]
6
+
7
+ - fix(Object): border rendering with padding under group [#9161](https://github.com/fabricjs/fabric.js/pull/9161)
8
+ - fix(MultiSelection): add target from behind active selection [#8744](https://github.com/fabricjs/fabric.js/issues/8744)
9
+ - test(): fix snapshots by removing version [#9164](https://github.com/fabricjs/fabric.js/pull/9164)
10
+
5
11
  ## [6.0.0-beta11]
6
12
 
7
13
  - patch(): Avoid unwanted mutation to passed objects array to Group constructor [#9151](https://github.com/fabricjs/fabric.js/pull/9151)
package/dist/index.js CHANGED
@@ -399,7 +399,7 @@
399
399
  }
400
400
  const cache = new Cache();
401
401
 
402
- var version = "6.0.0-beta11";
402
+ var version = "6.0.0-beta12";
403
403
 
404
404
  // use this syntax so babel plugin see this import here
405
405
  const VERSION = version;
@@ -9606,7 +9606,7 @@
9606
9606
  // this is extremely confusing. options comes from the upper function
9607
9607
  // and is the qrDecompose of a matrix that takes in account zoom too
9608
9608
  new Point(options.scaleX, options.scaleY)).scalarMultiply(this.strokeWidth);
9609
- size = bbox.add(stroke).scalarAdd(this.borderScaleFactor);
9609
+ size = bbox.add(stroke).scalarAdd(this.borderScaleFactor).scalarAdd(this.padding * 2);
9610
9610
  } else {
9611
9611
  size = this._calculateCurrentDimensions().scalarAdd(this.borderScaleFactor);
9612
9612
  }
@@ -15662,8 +15662,13 @@
15662
15662
  if (isAS) {
15663
15663
  const prevActiveObjects = activeSelection.getObjects();
15664
15664
  if (target === activeSelection) {
15665
- // find target from active objects
15666
- target = this.searchPossibleTargets(prevActiveObjects, this.getPointer(e, true));
15665
+ const pointer = this.getPointer(e, true);
15666
+ target =
15667
+ // first search active objects for a target to remove
15668
+ this.searchPossibleTargets(prevActiveObjects, pointer) ||
15669
+ // if not found, search under active selection for a target to add
15670
+ // `prevActiveObjects` will be searched but we already know they will not be found
15671
+ this.searchPossibleTargets(this._objects, pointer);
15667
15672
  // if nothing is found bail out
15668
15673
  if (!target || !target.selectable) {
15669
15674
  return false;