customized-fabric 1.6.1 → 1.6.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -51,10 +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
- this.textObject.set({
56
- width: this.width,
57
- });
58
54
  if (options?.isOriginal) {
59
55
  this.rectObject?.set({ strokeWidth: 0 });
60
56
  }
@@ -63,11 +59,10 @@ const TextInputClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
63
59
  this.rectObject?.set({ strokeWidth: 0 });
64
60
  }
65
61
  if (options?.fontUrl) {
66
- (0, utils_1.loadFontFromUrl)(options?.fontUrl, text?.fontFamily ?? "").then(() => {
67
- this.canvas?.renderAll?.();
68
- });
62
+ (0, utils_1.loadFontFromUrl)(options?.fontUrl, text?.fontFamily ?? "");
69
63
  }
70
64
  }
65
+ this.fire("scaling");
71
66
  },
72
67
  autoChangeFontSize: function (changeSpeed) {
73
68
  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.3",
4
4
  "description": "Customized fabric",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",