@anu3ev/fabric-image-editor 0.1.66 → 0.1.67

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 +8 -3
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -1113,7 +1113,7 @@ class D {
1113
1113
  const c = s === "application/pdf", l = c ? "image/jpg" : s, h = D.getFormatFromContentType(l);
1114
1114
  o.setCoords();
1115
1115
  const { left: g, top: u, width: m, height: M } = o.getBoundingRect(), f = yield a.clone(["id", "format", "locked"]);
1116
- ["image/jpg", "image/jpeg"].includes(l) && (f.backgroundColor = "#ffffff");
1116
+ f.enableRetinaScaling = !1, ["image/jpg", "image/jpeg"].includes(l) && (f.backgroundColor = "#ffffff");
1117
1117
  const j = f.getObjects().find((I) => I.id === o.id);
1118
1118
  j && (j.visible = !1), f.viewportTransform = [1, 0, 0, 1, -g, -u], f.setDimensions({ width: m, height: M }, { backstoreOnly: !0 }), f.renderAll();
1119
1119
  const A = f.getObjects().filter((I) => I.format).every((I) => I.format === "svg");
@@ -1263,7 +1263,9 @@ class D {
1263
1263
  };
1264
1264
  return o.fire("editor:object-exported", j), j;
1265
1265
  }
1266
- const h = c.toCanvasElement(), g = yield new Promise((M, f) => {
1266
+ const h = c.toCanvasElement({
1267
+ enableRetinaScaling: !1
1268
+ }), g = yield new Promise((M, f) => {
1267
1269
  h.toBlob((j) => {
1268
1270
  j ? M(j) : f(new Error("Failed to create Blob from canvas"));
1269
1271
  });
@@ -2393,7 +2395,9 @@ class lt {
2393
2395
  });
2394
2396
  return;
2395
2397
  }
2396
- const i = s.toCanvasElement().toDataURL(), a = i.slice(5).split(";")[0], o = i.split(",")[1], d = atob(o), c = new Uint8Array(d.length);
2398
+ const i = s.toCanvasElement({
2399
+ enableRetinaScaling: !1
2400
+ }).toDataURL(), a = i.slice(5).split(";")[0], o = i.split(",")[1], d = atob(o), c = new Uint8Array(d.length);
2397
2401
  for (let g = 0; g < d.length; g += 1)
2398
2402
  c[g] = d.charCodeAt(g);
2399
2403
  const l = new Blob([c.buffer], { type: a }), h = new ClipboardItem({ [a]: l });
@@ -2887,6 +2891,7 @@ const mt = {
2887
2891
  preserveObjectStacking: !0,
2888
2892
  controlsAboveOverlay: !0,
2889
2893
  centeredRotation: !0,
2894
+ enableRetinaScaling: !1,
2890
2895
  /*
2891
2896
  * Кастомные опции
2892
2897
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anu3ev/fabric-image-editor",
3
- "version": "0.1.66",
3
+ "version": "0.1.67",
4
4
  "description": "JavaScript image editor 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": [