customized-fabric 1.9.4 → 1.9.6

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.
@@ -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;
@@ -223,8 +223,9 @@ const asyncGetObject = async (object, options) => {
223
223
  ...object,
224
224
  isOriginal: options?.isOriginal,
225
225
  });
226
- if (object?.calendarSettings?.url) {
227
- await calendarObject?.loadImage?.(object?.calendarSettings?.url);
226
+ const url = object?.calendarSettings?.url;
227
+ if (url) {
228
+ await calendarObject?.loadImage?.(url);
228
229
  }
229
230
  return calendarObject;
230
231
  }
@@ -233,8 +234,9 @@ const asyncGetObject = async (object, options) => {
233
234
  ...object,
234
235
  isOriginal: options?.isOriginal,
235
236
  });
236
- if (object?.qrCodeSettings?.url) {
237
- await qrCodeObject?.loadImage?.(object?.calendarSettings?.url);
237
+ const url = object?.qrCodeSettings?.url;
238
+ if (url) {
239
+ await qrCodeObject?.loadImage?.(url);
238
240
  }
239
241
  return qrCodeObject;
240
242
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "customized-fabric",
3
- "version": "1.9.4",
3
+ "version": "1.9.6",
4
4
  "description": "Customized fabric",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",