@postermywall/fabricjs-2 7.1.0-pmw-64 → 7.1.0-pmw-65

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,8 @@
2
2
 
3
3
  ## [next]
4
4
 
5
+ - Upgrade 7.4.0 [#4](https://github.com/fabricjs/fabric.js/pull/4)
6
+
5
7
  ## [7.4.0]
6
8
 
7
9
  - feat(): Support viewport rotation in getZoom, dimensions, and control coords [#10977](https://github.com/fabricjs/fabric.js/pull/10977)
package/dist/index.js CHANGED
@@ -429,7 +429,7 @@
429
429
  const cache = new Cache();
430
430
  //#endregion
431
431
  //#region src/constants.ts
432
- const VERSION = "7.1.0-pmw-61";
432
+ const VERSION = "7.1.0-pmw-65";
433
433
  function noop() {}
434
434
  const halfPI = Math.PI / 2;
435
435
  const quarterPI = Math.PI / 4;
@@ -12779,7 +12779,8 @@
12779
12779
  grouped = true;
12780
12780
  shouldRender = true;
12781
12781
  } else if (this._shouldClearSelection(e, target)) this.discardActiveObject(e);
12782
- if (this.selection && !config.disableGroupSelector && (!target || (!target.selectable || target.activeOn === "up") && !target.isEditing && target !== this._activeObject)) {
12782
+ const isPressOnMovementLockedBody = !!target && target.lockMovementX && target.lockMovementY && !target.isEditing && !target.findControl(this.getViewportPoint(e), isTouchEvent(e));
12783
+ if (this.selection && !config.disableGroupSelector && (!target || isPressOnMovementLockedBody || (!target.selectable || target.activeOn === "up") && !target.isEditing && target !== this._activeObject)) {
12783
12784
  const p = this.getScenePoint(e);
12784
12785
  this._groupSelector = {
12785
12786
  x: p.x,
@@ -12795,7 +12796,7 @@
12795
12796
  if (this._activeObject && this._activeObject !== target) target = this._activeObject;
12796
12797
  }
12797
12798
  const handle = target.findControl(this.getViewportPoint(e), isTouchEvent(e));
12798
- if (target === this._activeObject && (handle || !grouped || config.enableGroupSelection)) {
12799
+ if (target === this._activeObject && !this._groupSelector && (handle || !grouped || config.enableGroupSelection)) {
12799
12800
  this._setupCurrentTransform(e, target, alreadySelected);
12800
12801
  const control = handle ? handle.control : void 0, pointer = this.getScenePoint(e), mouseDownHandler = control && control.getMouseDownHandler(e, target, control);
12801
12802
  mouseDownHandler && mouseDownHandler.call(control, e, this._currentTransform, pointer.x, pointer.y);
@@ -13091,9 +13092,11 @@
13091
13092
  toCanvasElement(multiplier = 1, options) {
13092
13093
  const { upper } = this.elements;
13093
13094
  upper.ctx = void 0;
13094
- const htmlElement = super.toCanvasElement(multiplier, options);
13095
- upper.ctx = upper.el.getContext("2d");
13096
- return htmlElement;
13095
+ try {
13096
+ return super.toCanvasElement(multiplier, options);
13097
+ } finally {
13098
+ upper.ctx = upper.el.getContext("2d");
13099
+ }
13097
13100
  }
13098
13101
  /**
13099
13102
  * @override clear {@link textEditingManager}