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