customized-fabric 1.7.8 → 1.7.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -24,6 +24,7 @@ const CalendarClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
24
24
  this.setSizes({ width, height });
25
25
  this.canvas?.renderAll();
26
26
  });
27
+ const { width, height, objectFit } = options?.calendarSettings ?? {};
27
28
  this.set({
28
29
  _id: new objectId_1.ObjectId().toString(),
29
30
  name: constants_1.CALENDAR_OBJECT_ATTRIBUTES.name,
@@ -31,10 +32,9 @@ const CalendarClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
31
32
  ...options,
32
33
  layerId: options?.personalizeId ?? options?.layerId,
33
34
  objectCaching: false,
34
- calendarWidth: 400,
35
- calendarHeight: 400,
36
- objectFit: "contain",
37
- ...(options?.calendarSettings ?? {}),
35
+ calendarWidth: width ?? 400,
36
+ calendarHeight: height ?? 400,
37
+ objectFit: objectFit ?? "contain",
38
38
  });
39
39
  if (options?.isOriginal) {
40
40
  this.rectObject?.set({ strokeWidth: 0 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "customized-fabric",
3
- "version": "1.7.8",
3
+ "version": "1.7.9",
4
4
  "description": "Customized fabric",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",