customized-fabric 1.6.0 → 1.6.2

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.
@@ -8,4 +8,5 @@ export interface IClipartOptions extends fabric.IGroupOptions {
8
8
  isOriginal?: boolean;
9
9
  isAdditional?: boolean;
10
10
  hideStroke?: boolean;
11
+ clipartOptionId?: number;
11
12
  }
@@ -51,7 +51,6 @@ const TextInputClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
51
51
  layerId: options?.personalizeId ?? options?.layerId,
52
52
  objectCaching: false,
53
53
  });
54
- this.autoChangeFontSize(0.1);
55
54
  this.textObject.set({
56
55
  width: this.width,
57
56
  });
@@ -64,10 +63,12 @@ const TextInputClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
64
63
  }
65
64
  if (options?.fontUrl) {
66
65
  (0, utils_1.loadFontFromUrl)(options?.fontUrl, text?.fontFamily ?? "").then(() => {
66
+ this.autoChangeFontSize(0.1);
67
67
  this.canvas?.renderAll?.();
68
68
  });
69
69
  }
70
70
  }
71
+ this.autoChangeFontSize(0.1);
71
72
  },
72
73
  autoChangeFontSize: function (changeSpeed) {
73
74
  if (this.width <= this.textObject.__lineWidths ||
@@ -209,7 +209,7 @@ const asyncGetObject = async (object, options) => {
209
209
  };
210
210
  exports.asyncGetObject = asyncGetObject;
211
211
  fabric_1.fabric.Object.prototype.transparentCorners = false;
212
- fabric_1.fabric.Object.prototype.cornerColor = "black";
212
+ fabric_1.fabric.Object.prototype.cornerColor = "transparent";
213
213
  fabric_1.fabric.Object.prototype.cornerStyle = "circle";
214
214
  fabric_1.fabric.Object.prototype.cornerStrokeColor = "black";
215
215
  fabric_1.fabric.Object.prototype.borderColor = "black";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "customized-fabric",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "Customized fabric",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",