customized-fabric 1.8.5 → 1.8.7
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.
@@ -18,6 +18,7 @@ export declare const toCalendarObject: (object: Calendar) => {
|
|
18
18
|
titleAlignment: string | undefined;
|
19
19
|
titleColor: string | undefined;
|
20
20
|
titleFontUrl: string | undefined;
|
21
|
+
letterCase: string | undefined;
|
21
22
|
dayColor: string | undefined;
|
22
23
|
dayFontUrl: string | undefined;
|
23
24
|
markerColor: string | undefined;
|
@@ -40,6 +41,7 @@ export default class Calendar extends fabric.Group {
|
|
40
41
|
calendarTitleAlignment?: string;
|
41
42
|
calendarTitleColor?: string;
|
42
43
|
calendarTitleFontUrl?: string;
|
44
|
+
calendarLetterCase?: string;
|
43
45
|
calendarDayColor?: string;
|
44
46
|
calendarDayFontUrl?: string;
|
45
47
|
calendarMarkerColor?: string;
|
@@ -111,6 +111,7 @@ const CalendarClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
|
|
111
111
|
titleAlignment: this?.calendarTitleAlignment,
|
112
112
|
titleColor: this?.calendarTitleColor,
|
113
113
|
titleFontUrl: this?.calendarTitleFontUrl,
|
114
|
+
letterCase: this?.calendarLetterCase,
|
114
115
|
dayColor: this?.calendarDayColor,
|
115
116
|
dayFontUrl: this?.calendarDayFontUrl,
|
116
117
|
markerColor: this?.calendarMarkerColor,
|
@@ -137,6 +138,7 @@ const toCalendarObject = (object) => {
|
|
137
138
|
titleAlignment: object?.calendarTitleAlignment,
|
138
139
|
titleColor: object?.calendarTitleColor,
|
139
140
|
titleFontUrl: object?.calendarTitleFontUrl,
|
141
|
+
letterCase: object?.calendarLetterCase,
|
140
142
|
dayColor: object?.calendarDayColor,
|
141
143
|
dayFontUrl: object?.calendarDayFontUrl,
|
142
144
|
markerColor: object?.calendarMarkerColor,
|
@@ -69,22 +69,24 @@ const TextInputClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
|
|
69
69
|
this.fire("scaling");
|
70
70
|
},
|
71
71
|
autoChangeFontSize: function (changeSpeed) {
|
72
|
-
|
73
|
-
|
74
|
-
while (this.width <=
|
72
|
+
let maxLineWidth = Math.max(...this.textObject.__lineWidths);
|
73
|
+
if (this.width <= maxLineWidth || this.height <= this.textObject.height) {
|
74
|
+
while (this.width <= maxLineWidth ||
|
75
75
|
this.height <= this.textObject.height) {
|
76
76
|
this.textObject.set({
|
77
77
|
fontSize: this.textObject.fontSize - changeSpeed,
|
78
78
|
});
|
79
|
+
maxLineWidth = Math.max(...this.textObject.__lineWidths);
|
79
80
|
}
|
80
81
|
}
|
81
82
|
else {
|
82
83
|
while (this.textObject.maxFontSize > this.textObject.fontSize &&
|
83
|
-
this.width >
|
84
|
+
this.width > maxLineWidth &&
|
84
85
|
this.height > this.textObject.height) {
|
85
86
|
this.textObject.set({
|
86
87
|
fontSize: this.textObject.fontSize + changeSpeed,
|
87
88
|
});
|
89
|
+
maxLineWidth = Math.max(...this.textObject.__lineWidths);
|
88
90
|
}
|
89
91
|
}
|
90
92
|
},
|
@@ -126,8 +128,8 @@ const TextInputClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
|
|
126
128
|
this.textObject.set({
|
127
129
|
fontSize,
|
128
130
|
});
|
129
|
-
|
130
|
-
|
131
|
+
const maxLineWidth = Math.max(...this.textObject.__lineWidths);
|
132
|
+
if (maxLineWidth < this.width && this.textObject.height < this.height) {
|
131
133
|
}
|
132
134
|
else {
|
133
135
|
this.autoChangeFontSize(1);
|
@@ -209,6 +211,8 @@ const toTextInputObject = (object) => {
|
|
209
211
|
infix: textObject?.infix,
|
210
212
|
suffix: textObject?.suffix,
|
211
213
|
isAllCapital: textObject?.isAllCapital,
|
214
|
+
lineHeight: textObject?.lineHeight,
|
215
|
+
charSpacing: textObject?.charSpacing,
|
212
216
|
},
|
213
217
|
};
|
214
218
|
};
|