customized-fabric 1.7.8 → 1.8.0
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.
@@ -11,7 +11,7 @@ export declare const toCalendarObject: (object: Calendar) => {
|
|
11
11
|
isAdditional: boolean | undefined;
|
12
12
|
layoutGroupId: string | undefined;
|
13
13
|
layoutGroupName: string | undefined;
|
14
|
-
|
14
|
+
calendarSettings: {
|
15
15
|
width: number | undefined;
|
16
16
|
height: number | undefined;
|
17
17
|
objectFit: string | undefined;
|
@@ -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 });
|
@@ -110,7 +110,7 @@ const toCalendarObject = (object) => {
|
|
110
110
|
isAdditional: object?.isAdditional,
|
111
111
|
layoutGroupId: object?.layoutGroupId,
|
112
112
|
layoutGroupName: object?.layoutGroupName,
|
113
|
-
|
113
|
+
calendarSettings: {
|
114
114
|
width: object?.calendarWidth,
|
115
115
|
height: object?.calendarHeight,
|
116
116
|
objectFit: object?.objectFit,
|