customized-fabric 1.9.5 → 1.9.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,12 @@
1
1
  import { ObjectId } from "../utils/objectId";
2
2
  export interface QRCodeSettings {
3
- data?: string;
4
- margin?: string;
3
+ data?: any;
4
+ margin?: number;
5
5
  eyeShape?: string;
6
6
  dataShape?: string;
7
7
  backgroundColor?: string;
8
8
  dataColor?: string;
9
- effectRatio?: string;
9
+ effectRatio?: number;
10
10
  }
11
11
  export interface IQRCodeOptions extends fabric.IGroupOptions {
12
12
  _id?: ObjectId;
@@ -87,6 +87,7 @@ const TextInputClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
87
87
  });
88
88
  maxLineWidth = Math.max(...this.textObject.__lineWidths);
89
89
  }
90
+ this.textObject.set({ width: this.width - fontSize / 4 });
90
91
  },
91
92
  setText: function (text) {
92
93
  this.textObject.set({
@@ -142,7 +143,7 @@ const TextInputClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
142
143
  },
143
144
  setTextAttributes: function (options) {
144
145
  this.textObject.set(options);
145
- this.canvas?.renderAll?.();
146
+ this.fire("scaling");
146
147
  },
147
148
  getTextAttribute: function (attribute) {
148
149
  return this.textObject.get(attribute);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "customized-fabric",
3
- "version": "1.9.5",
3
+ "version": "1.9.7",
4
4
  "description": "Customized fabric",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",