customized-fabric 1.8.2 → 1.8.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -24,7 +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
|
+
const { width, height, backgroundColor, titleColor, dayColor, dateColor, markedDateColor, markerUrl, fontUrl, objectFit, } = options?.calendarSettings ?? {};
|
28
28
|
this.set({
|
29
29
|
_id: new objectId_1.ObjectId().toString(),
|
30
30
|
name: constants_1.CALENDAR_OBJECT_ATTRIBUTES.name,
|
@@ -34,6 +34,13 @@ const CalendarClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
|
|
34
34
|
objectCaching: false,
|
35
35
|
calendarWidth: width ?? 400,
|
36
36
|
calendarHeight: height ?? 400,
|
37
|
+
calendarBackgroundColor: backgroundColor,
|
38
|
+
calendarTitleColor: titleColor,
|
39
|
+
calendarDayColor: dayColor,
|
40
|
+
calendarDateColor: dateColor,
|
41
|
+
calendarMarkedDateColor: markedDateColor,
|
42
|
+
calendarMarkerUrl: markerUrl,
|
43
|
+
calendarFontUrl: fontUrl,
|
37
44
|
objectFit: objectFit ?? "contain",
|
38
45
|
});
|
39
46
|
if (options?.isOriginal) {
|
@@ -10,6 +10,13 @@ export interface ICalendarOptions extends fabric.IGroupOptions {
|
|
10
10
|
calendarSettings?: {
|
11
11
|
width?: number;
|
12
12
|
height?: number;
|
13
|
+
backgroundColor: string;
|
14
|
+
titleColor: string;
|
15
|
+
dayColor: string;
|
16
|
+
dateColor: string;
|
17
|
+
markedDateColor: string;
|
18
|
+
markerUrl: string;
|
19
|
+
fontUrl: string;
|
13
20
|
objectFit?: string;
|
14
21
|
};
|
15
22
|
}
|