customized-fabric 1.6.1 → 1.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "customized-fabric",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Customized fabric",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",