@nasser-sw/fabric 7.0.1-beta20 → 7.0.1-beta22

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.
@@ -410,7 +410,7 @@ class Cache {
410
410
  }
411
411
  const cache = new Cache();
412
412
 
413
- var version = "7.0.1-beta19";
413
+ var version = "7.0.1-beta21";
414
414
 
415
415
  // use this syntax so babel plugin see this import here
416
416
  const VERSION = version;
@@ -30448,6 +30448,11 @@ class Frame extends Group {
30448
30448
  * @private
30449
30449
  */
30450
30450
  _defineProperty(this, "_placeholder", null);
30451
+ /**
30452
+ * Stored objectCaching value before edit mode
30453
+ * @private
30454
+ */
30455
+ _defineProperty(this, "_editModeObjectCaching", void 0);
30451
30456
  /**
30452
30457
  * Bound constraint handler references for cleanup
30453
30458
  * @private
@@ -31028,6 +31033,12 @@ class Frame extends Group {
31028
31033
  }
31029
31034
  this.isEditMode = true;
31030
31035
 
31036
+ // Disable caching during edit mode - otherwise the cache canvas
31037
+ // clips content to the frame bounds, preventing us from seeing
31038
+ // the full image outside the frame
31039
+ this._editModeObjectCaching = this.objectCaching;
31040
+ this.objectCaching = false;
31041
+
31031
31042
  // Enable sub-target interaction so clicks go through to content
31032
31043
  this.subTargetCheck = true;
31033
31044
  this.interactive = true;
@@ -31057,9 +31068,10 @@ class Frame extends Group {
31057
31068
  this._setupEditModeConstraints();
31058
31069
  this.set('dirty', true);
31059
31070
 
31060
- // Select the content image on the canvas
31071
+ // Just render - don't call setActiveObject() on the content image
31072
+ // because it causes position miscalculation with viewport transforms.
31073
+ // The content image is still interactive via subTargetCheck = true
31061
31074
  if (this.canvas) {
31062
- this.canvas.setActiveObject(this._contentImage);
31063
31075
  this.canvas.renderAll();
31064
31076
  }
31065
31077
 
@@ -31302,6 +31314,12 @@ class Frame extends Group {
31302
31314
  } else {
31303
31315
  this._updateClipPath();
31304
31316
  }
31317
+
31318
+ // Restore caching setting
31319
+ if (this._editModeObjectCaching !== undefined) {
31320
+ this.objectCaching = this._editModeObjectCaching;
31321
+ this._editModeObjectCaching = undefined;
31322
+ }
31305
31323
  this.set('dirty', true);
31306
31324
 
31307
31325
  // Re-select the frame itself