@anu3ev/fabric-image-editor 0.9.12 → 0.9.13

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.
Files changed (2) hide show
  1. package/dist/main.js +10 -1
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -278,7 +278,7 @@ var E = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", D =
278
278
  }
279
279
  handleResetObjectFit(e) {
280
280
  let { target: t, e: n } = e;
281
- n && (n.ctrlKey || n.metaKey) || !t || t instanceof v || t.shapeComposite || this.editor.transformManager.resetObject({ object: t });
281
+ n && (n.ctrlKey || n.metaKey) || this.editor.cropManager.resetFrameToSource({ target: t }) || !t || t instanceof v || t.shapeComposite || this.editor.transformManager.resetObject({ object: t });
282
282
  }
283
283
  _shouldIgnoreKeyboardEvent(e) {
284
284
  let t = document.activeElement, n = e.target, r = [
@@ -15137,6 +15137,15 @@ var Fc = {
15137
15137
  size: n
15138
15138
  }), this.getState();
15139
15139
  }
15140
+ resetFrameToSource({ target: e }) {
15141
+ let { _session: t } = this;
15142
+ if (!t || t.frame !== e) return null;
15143
+ let n = Cs({ source: t.source });
15144
+ return this._applyFrameSize({
15145
+ session: t,
15146
+ size: n
15147
+ }), this.getState();
15148
+ }
15140
15149
  apply() {
15141
15150
  let { _session: e } = this;
15142
15151
  if (!e) return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anu3ev/fabric-image-editor",
3
- "version": "0.9.12",
3
+ "version": "0.9.13",
4
4
  "description": "TypeScript image editor library built on FabricJS, allowing you to create instances with an integrated montage area and providing an API to modify and manage state.",
5
5
  "module": "dist/main.js",
6
6
  "files": [