customized-fabric 1.8.4 → 1.8.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
|
|
1
1
|
import { fabric } from "fabric";
|
2
|
-
import { ICalendarOptions } from "./interfaces";
|
2
|
+
import { CalendarSettings, ICalendarOptions } from "./interfaces";
|
3
3
|
import { ObjectId } from "../utils/objectId";
|
4
4
|
export declare const toCalendarObject: (object: Calendar) => {
|
5
5
|
_id: ObjectId | undefined;
|
@@ -52,5 +52,6 @@ export default class Calendar extends fabric.Group {
|
|
52
52
|
}) => void;
|
53
53
|
loadImage?: (imageInput: File | string) => Promise<void>;
|
54
54
|
fitImage?: (image: fabric.Image, cover?: boolean) => void;
|
55
|
+
getCalendarAttributes?: () => CalendarSettings;
|
55
56
|
constructor(options?: ICalendarOptions);
|
56
57
|
}
|
@@ -103,6 +103,21 @@ const CalendarClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
|
|
103
103
|
getSettings: function (attribute) {
|
104
104
|
return this.get(attribute);
|
105
105
|
},
|
106
|
+
getCalendarAttributes: function () {
|
107
|
+
return {
|
108
|
+
width: this?.calendarWidth,
|
109
|
+
height: this?.calendarHeight,
|
110
|
+
backgroundColor: this?.calendarBackgroundColor,
|
111
|
+
titleAlignment: this?.calendarTitleAlignment,
|
112
|
+
titleColor: this?.calendarTitleColor,
|
113
|
+
titleFontUrl: this?.calendarTitleFontUrl,
|
114
|
+
dayColor: this?.calendarDayColor,
|
115
|
+
dayFontUrl: this?.calendarDayFontUrl,
|
116
|
+
markerColor: this?.calendarMarkerColor,
|
117
|
+
markerUrl: this?.calendarMarkerUrl,
|
118
|
+
date: this?.calendarDate,
|
119
|
+
};
|
120
|
+
},
|
106
121
|
});
|
107
122
|
const toCalendarObject = (object) => {
|
108
123
|
return {
|
@@ -1,4 +1,17 @@
|
|
1
1
|
import { ObjectId } from "../utils/objectId";
|
2
|
+
export interface CalendarSettings {
|
3
|
+
width?: number;
|
4
|
+
height?: number;
|
5
|
+
backgroundColor?: string;
|
6
|
+
titleAlignment?: string;
|
7
|
+
titleColor?: string;
|
8
|
+
titleFontUrl?: string;
|
9
|
+
dayColor?: string;
|
10
|
+
dayFontUrl?: string;
|
11
|
+
markerColor?: string;
|
12
|
+
markerUrl?: string;
|
13
|
+
date?: string;
|
14
|
+
}
|
2
15
|
export interface ICalendarOptions extends fabric.IGroupOptions {
|
3
16
|
_id?: ObjectId;
|
4
17
|
personalizeId?: number;
|
@@ -7,17 +20,5 @@ export interface ICalendarOptions extends fabric.IGroupOptions {
|
|
7
20
|
isOriginal?: boolean;
|
8
21
|
isAdditional?: boolean;
|
9
22
|
hideStroke?: boolean;
|
10
|
-
calendarSettings?:
|
11
|
-
width?: number;
|
12
|
-
height?: number;
|
13
|
-
backgroundColor?: string;
|
14
|
-
titleAlignment?: string;
|
15
|
-
titleColor?: string;
|
16
|
-
titleFontUrl?: string;
|
17
|
-
dayColor?: string;
|
18
|
-
dayFontUrl?: string;
|
19
|
-
markerColor?: string;
|
20
|
-
markerUrl?: string;
|
21
|
-
date?: string;
|
22
|
-
};
|
23
|
+
calendarSettings?: CalendarSettings;
|
23
24
|
}
|