customized-fabric 1.7.1 → 1.7.2
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.
- package/lib/CurvedTextObject/index.d.ts +1 -0
- package/lib/CurvedTextObject/index.js +4 -1
- package/lib/CurvedTextObject/interfaces.d.ts +2 -1
- package/lib/TextInputObject/index.d.ts +1 -0
- package/lib/TextInputObject/index.js +4 -1
- package/lib/TextInputObject/interfaces.d.ts +2 -1
- package/package.json +1 -1
|
@@ -111,7 +111,9 @@ const CurvedTextClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group,
|
|
|
111
111
|
},
|
|
112
112
|
getText: function () {
|
|
113
113
|
const { prefix = "", infix = "", suffix = "" } = this.textObject;
|
|
114
|
-
|
|
114
|
+
const isAllCapital = this.textObject.isAllCapital;
|
|
115
|
+
const text = prefix + infix + suffix;
|
|
116
|
+
this.setText(infix?.length > 0 ? (isAllCapital ? text.toUpperCase() : text) : "");
|
|
115
117
|
},
|
|
116
118
|
setMaxFontSize: function (fontSize) {
|
|
117
119
|
this.textObject.set({
|
|
@@ -225,6 +227,7 @@ const toCurvedTextObject = (object) => {
|
|
|
225
227
|
curvedWidth: textObject?.curvedWidth,
|
|
226
228
|
pathSide: textObject?.pathSide,
|
|
227
229
|
pathStartOffset: textObject?.pathStartOffset,
|
|
230
|
+
isAllCapital: textObject?.isAllCapital,
|
|
228
231
|
},
|
|
229
232
|
};
|
|
230
233
|
};
|
|
@@ -10,7 +10,7 @@ export interface ICurvedTextOptions extends fabric.IGroupOptions {
|
|
|
10
10
|
height?: number;
|
|
11
11
|
textAlign?: string;
|
|
12
12
|
fontWeight?: string;
|
|
13
|
-
text
|
|
13
|
+
text?: string;
|
|
14
14
|
fontFamily?: string;
|
|
15
15
|
maxFontSize: number;
|
|
16
16
|
stroke?: string;
|
|
@@ -19,6 +19,7 @@ export interface ICurvedTextOptions extends fabric.IGroupOptions {
|
|
|
19
19
|
infix?: string;
|
|
20
20
|
suffix?: string;
|
|
21
21
|
curvedWidth?: number;
|
|
22
|
+
isAllCapital?: boolean;
|
|
22
23
|
};
|
|
23
24
|
fontUrl?: string;
|
|
24
25
|
isOriginal?: boolean;
|
|
@@ -117,7 +117,9 @@ const TextInputClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
|
|
|
117
117
|
},
|
|
118
118
|
getText: function () {
|
|
119
119
|
const { prefix = "", infix = "", suffix = "" } = this.textObject;
|
|
120
|
-
|
|
120
|
+
const isAllCapital = this.textObject.isAllCapital;
|
|
121
|
+
const text = prefix + infix + suffix;
|
|
122
|
+
this.setText(infix?.length > 0 ? (isAllCapital ? text.toUpperCase() : text) : "");
|
|
121
123
|
},
|
|
122
124
|
setMaxFontSize: function (fontSize) {
|
|
123
125
|
this.textObject.set({
|
|
@@ -205,6 +207,7 @@ const toTextInputObject = (object) => {
|
|
|
205
207
|
prefix: textObject?.prefix,
|
|
206
208
|
infix: textObject?.infix,
|
|
207
209
|
suffix: textObject?.suffix,
|
|
210
|
+
isAllCapital: textObject?.isAllCapital,
|
|
208
211
|
},
|
|
209
212
|
};
|
|
210
213
|
};
|
|
@@ -10,7 +10,7 @@ export interface ITextInputOptions extends fabric.IGroupOptions {
|
|
|
10
10
|
height?: number;
|
|
11
11
|
textAlign?: string;
|
|
12
12
|
fontWeight?: string;
|
|
13
|
-
text
|
|
13
|
+
text?: string;
|
|
14
14
|
fontFamily?: string;
|
|
15
15
|
maxFontSize: number;
|
|
16
16
|
stroke?: string;
|
|
@@ -18,6 +18,7 @@ export interface ITextInputOptions extends fabric.IGroupOptions {
|
|
|
18
18
|
prefix?: string;
|
|
19
19
|
infix?: string;
|
|
20
20
|
suffix?: string;
|
|
21
|
+
isAllCapital?: boolean;
|
|
21
22
|
};
|
|
22
23
|
fontUrl?: string;
|
|
23
24
|
isOriginal?: boolean;
|