@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.
package/dist/index.mjs CHANGED
@@ -354,7 +354,7 @@ class Cache {
354
354
  }
355
355
  const cache = new Cache();
356
356
 
357
- var version = "7.0.1-beta19";
357
+ var version = "7.0.1-beta21";
358
358
 
359
359
  // use this syntax so babel plugin see this import here
360
360
  const VERSION = version;
@@ -30392,6 +30392,11 @@ class Frame extends Group {
30392
30392
  * @private
30393
30393
  */
30394
30394
  _defineProperty(this, "_placeholder", null);
30395
+ /**
30396
+ * Stored objectCaching value before edit mode
30397
+ * @private
30398
+ */
30399
+ _defineProperty(this, "_editModeObjectCaching", void 0);
30395
30400
  /**
30396
30401
  * Bound constraint handler references for cleanup
30397
30402
  * @private
@@ -30972,6 +30977,12 @@ class Frame extends Group {
30972
30977
  }
30973
30978
  this.isEditMode = true;
30974
30979
 
30980
+ // Disable caching during edit mode - otherwise the cache canvas
30981
+ // clips content to the frame bounds, preventing us from seeing
30982
+ // the full image outside the frame
30983
+ this._editModeObjectCaching = this.objectCaching;
30984
+ this.objectCaching = false;
30985
+
30975
30986
  // Enable sub-target interaction so clicks go through to content
30976
30987
  this.subTargetCheck = true;
30977
30988
  this.interactive = true;
@@ -31001,9 +31012,10 @@ class Frame extends Group {
31001
31012
  this._setupEditModeConstraints();
31002
31013
  this.set('dirty', true);
31003
31014
 
31004
- // Select the content image on the canvas
31015
+ // Just render - don't call setActiveObject() on the content image
31016
+ // because it causes position miscalculation with viewport transforms.
31017
+ // The content image is still interactive via subTargetCheck = true
31005
31018
  if (this.canvas) {
31006
- this.canvas.setActiveObject(this._contentImage);
31007
31019
  this.canvas.renderAll();
31008
31020
  }
31009
31021
 
@@ -31246,6 +31258,12 @@ class Frame extends Group {
31246
31258
  } else {
31247
31259
  this._updateClipPath();
31248
31260
  }
31261
+
31262
+ // Restore caching setting
31263
+ if (this._editModeObjectCaching !== undefined) {
31264
+ this.objectCaching = this._editModeObjectCaching;
31265
+ this._editModeObjectCaching = undefined;
31266
+ }
31249
31267
  this.set('dirty', true);
31250
31268
 
31251
31269
  // Re-select the frame itself