@babylonjs/gui 5.19.0 → 5.22.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.
- package/2D/adtInstrumentation.js +70 -90
- package/2D/adtInstrumentation.js.map +1 -1
- package/2D/advancedDynamicTexture.d.ts +8 -0
- package/2D/advancedDynamicTexture.js +559 -620
- package/2D/advancedDynamicTexture.js.map +1 -1
- package/2D/controls/button.js +76 -90
- package/2D/controls/button.js.map +1 -1
- package/2D/controls/checkbox.js +86 -106
- package/2D/controls/checkbox.js.map +1 -1
- package/2D/controls/colorpicker.js +395 -415
- package/2D/controls/colorpicker.js.map +1 -1
- package/2D/controls/container.js +187 -230
- package/2D/controls/container.js.map +1 -1
- package/2D/controls/control.js +1073 -1353
- package/2D/controls/control.js.map +1 -1
- package/2D/controls/displayGrid.js +152 -196
- package/2D/controls/displayGrid.js.map +1 -1
- package/2D/controls/ellipse.js +32 -40
- package/2D/controls/ellipse.js.map +1 -1
- package/2D/controls/focusableButton.js +30 -35
- package/2D/controls/focusableButton.js.map +1 -1
- package/2D/controls/grid.js +172 -212
- package/2D/controls/grid.js.map +1 -1
- package/2D/controls/image.js +489 -592
- package/2D/controls/image.js.map +1 -1
- package/2D/controls/inputPassword.js +9 -16
- package/2D/controls/inputPassword.js.map +1 -1
- package/2D/controls/inputText.js +380 -467
- package/2D/controls/inputText.js.map +1 -1
- package/2D/controls/inputTextArea.js +234 -273
- package/2D/controls/inputTextArea.js.map +1 -1
- package/2D/controls/line.js +147 -198
- package/2D/controls/line.js.map +1 -1
- package/2D/controls/multiLine.js +87 -113
- package/2D/controls/multiLine.js.map +1 -1
- package/2D/controls/radioButton.js +106 -127
- package/2D/controls/radioButton.js.map +1 -1
- package/2D/controls/rectangle.js +64 -76
- package/2D/controls/rectangle.js.map +1 -1
- package/2D/controls/scrollViewers/scrollViewer.js +439 -543
- package/2D/controls/scrollViewers/scrollViewer.js.map +1 -1
- package/2D/controls/scrollViewers/scrollViewerWindow.js +99 -118
- package/2D/controls/scrollViewers/scrollViewerWindow.js.map +1 -1
- package/2D/controls/selector.js +241 -329
- package/2D/controls/selector.js.map +1 -1
- package/2D/controls/sliders/baseSlider.js +182 -230
- package/2D/controls/sliders/baseSlider.js.map +1 -1
- package/2D/controls/sliders/imageBasedSlider.js +86 -109
- package/2D/controls/sliders/imageBasedSlider.js.map +1 -1
- package/2D/controls/sliders/imageScrollBar.d.ts +4 -0
- package/2D/controls/sliders/imageScrollBar.js +149 -163
- package/2D/controls/sliders/imageScrollBar.js.map +1 -1
- package/2D/controls/sliders/scrollBar.d.ts +4 -0
- package/2D/controls/sliders/scrollBar.js +65 -65
- package/2D/controls/sliders/scrollBar.js.map +1 -1
- package/2D/controls/sliders/slider.js +91 -115
- package/2D/controls/sliders/slider.js.map +1 -1
- package/2D/controls/stackPanel.js +114 -135
- package/2D/controls/stackPanel.js.map +1 -1
- package/2D/controls/statics.js +5 -5
- package/2D/controls/statics.js.map +1 -1
- package/2D/controls/textBlock.js +322 -384
- package/2D/controls/textBlock.js.map +1 -1
- package/2D/controls/textWrapper.js +27 -41
- package/2D/controls/textWrapper.js.map +1 -1
- package/2D/controls/toggleButton.js +105 -121
- package/2D/controls/toggleButton.js.map +1 -1
- package/2D/controls/virtualKeyboard.js +101 -123
- package/2D/controls/virtualKeyboard.js.map +1 -1
- package/2D/math2D.js +62 -70
- package/2D/math2D.js.map +1 -1
- package/2D/measure.js +30 -32
- package/2D/measure.js.map +1 -1
- package/2D/multiLinePoint.js +71 -89
- package/2D/multiLinePoint.js.map +1 -1
- package/2D/style.js +55 -73
- package/2D/style.js.map +1 -1
- package/2D/valueAndUnit.js +71 -104
- package/2D/valueAndUnit.js.map +1 -1
- package/2D/xmlLoader.js +70 -84
- package/2D/xmlLoader.js.map +1 -1
- package/3D/behaviors/defaultBehavior.js +40 -59
- package/3D/behaviors/defaultBehavior.js.map +1 -1
- package/3D/controls/abstractButton3D.js +8 -12
- package/3D/controls/abstractButton3D.js.map +1 -1
- package/3D/controls/button3D.js +30 -35
- package/3D/controls/button3D.js.map +1 -1
- package/3D/controls/container3D.js +57 -71
- package/3D/controls/container3D.js.map +1 -1
- package/3D/controls/contentDisplay3D.js +47 -60
- package/3D/controls/contentDisplay3D.js.map +1 -1
- package/3D/controls/control3D.js +123 -158
- package/3D/controls/control3D.js.map +1 -1
- package/3D/controls/cylinderPanel.js +28 -38
- package/3D/controls/cylinderPanel.js.map +1 -1
- package/3D/controls/handMenu.js +20 -29
- package/3D/controls/handMenu.js.map +1 -1
- package/3D/controls/holographicBackplate.js +52 -72
- package/3D/controls/holographicBackplate.js.map +1 -1
- package/3D/controls/holographicButton.js +160 -200
- package/3D/controls/holographicButton.js.map +1 -1
- package/3D/controls/holographicSlate.js +176 -206
- package/3D/controls/holographicSlate.js.map +1 -1
- package/3D/controls/meshButton3D.js +24 -30
- package/3D/controls/meshButton3D.js.map +1 -1
- package/3D/controls/nearMenu.js +57 -71
- package/3D/controls/nearMenu.js.map +1 -1
- package/3D/controls/planePanel.js +6 -13
- package/3D/controls/planePanel.js.map +1 -1
- package/3D/controls/scatterPanel.js +43 -54
- package/3D/controls/scatterPanel.js.map +1 -1
- package/3D/controls/slider3D.js +168 -222
- package/3D/controls/slider3D.js.map +1 -1
- package/3D/controls/spherePanel.js +29 -39
- package/3D/controls/spherePanel.js.map +1 -1
- package/3D/controls/stackPanel3D.js +36 -49
- package/3D/controls/stackPanel3D.js.map +1 -1
- package/3D/controls/touchButton3D.js +126 -154
- package/3D/controls/touchButton3D.js.map +1 -1
- package/3D/controls/touchHolographicButton.js +223 -272
- package/3D/controls/touchHolographicButton.js.map +1 -1
- package/3D/controls/touchHolographicMenu.js +55 -66
- package/3D/controls/touchHolographicMenu.js.map +1 -1
- package/3D/controls/touchMeshButton3D.js +24 -30
- package/3D/controls/touchMeshButton3D.js.map +1 -1
- package/3D/controls/volumeBasedPanel.js +85 -107
- package/3D/controls/volumeBasedPanel.js.map +1 -1
- package/3D/gizmos/gizmoHandle.js +68 -103
- package/3D/gizmos/gizmoHandle.js.map +1 -1
- package/3D/gizmos/slateGizmo.js +165 -182
- package/3D/gizmos/slateGizmo.js.map +1 -1
- package/3D/gui3DManager.js +76 -101
- package/3D/gui3DManager.js.map +1 -1
- package/3D/materials/fluent/fluentMaterial.js +110 -119
- package/3D/materials/fluent/fluentMaterial.js.map +1 -1
- package/3D/materials/fluent/shaders/fluent.fragment.js +20 -3
- package/3D/materials/fluent/shaders/fluent.fragment.js.map +1 -1
- package/3D/materials/fluent/shaders/fluent.vertex.js +11 -3
- package/3D/materials/fluent/shaders/fluent.vertex.js.map +1 -1
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.js +168 -177
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.js.map +1 -1
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js +9 -3
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js.map +1 -1
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js +15 -3
- package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js.map +1 -1
- package/3D/materials/fluentButton/fluentButtonMaterial.js +205 -213
- package/3D/materials/fluentButton/fluentButtonMaterial.js.map +1 -1
- package/3D/materials/fluentButton/shaders/fluentButton.fragment.js +6 -3
- package/3D/materials/fluentButton/shaders/fluentButton.fragment.js.map +1 -1
- package/3D/materials/fluentButton/shaders/fluentButton.vertex.js +6 -3
- package/3D/materials/fluentButton/shaders/fluentButton.vertex.js.map +1 -1
- package/3D/materials/handle/handleMaterial.js +56 -69
- package/3D/materials/handle/handleMaterial.js.map +1 -1
- package/3D/materials/handle/shaders/handle.fragment.js +3 -3
- package/3D/materials/handle/shaders/handle.fragment.js.map +1 -1
- package/3D/materials/handle/shaders/handle.vertex.js +3 -3
- package/3D/materials/handle/shaders/handle.vertex.js.map +1 -1
- package/3D/materials/mrdl/mrdlBackplateMaterial.js +158 -166
- package/3D/materials/mrdl/mrdlBackplateMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js +322 -330
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.js +322 -330
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.js.map +1 -1
- package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js +9 -3
- package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js.map +1 -1
- package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js +6 -3
- package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js.map +1 -1
- package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js +24 -3
- package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js.map +1 -1
- package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.js +12 -3
- package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.js.map +1 -1
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.js +24 -3
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.js.map +1 -1
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js +12 -3
- package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js.map +1 -1
- package/3D/vector3WithInfo.js +6 -12
- package/3D/vector3WithInfo.js.map +1 -1
- package/legacy/legacy.js +1 -1
- package/legacy/legacy.js.map +1 -1
- package/package.json +2 -5
package/2D/controls/textBlock.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __decorate
|
|
1
|
+
import { __decorate } from "@babylonjs/core/tslib.es6.js";
|
|
2
2
|
import { Observable } from "@babylonjs/core/Misc/observable.js";
|
|
3
3
|
import { ValueAndUnit } from "../valueAndUnit.js";
|
|
4
4
|
import { Control } from "./control.js";
|
|
@@ -30,305 +30,254 @@ export var TextWrapping;
|
|
|
30
30
|
/**
|
|
31
31
|
* Class used to create text block control
|
|
32
32
|
*/
|
|
33
|
-
|
|
34
|
-
__extends(TextBlock, _super);
|
|
33
|
+
export class TextBlock extends Control {
|
|
35
34
|
/**
|
|
36
35
|
* Creates a new TextBlock object
|
|
37
36
|
* @param name defines the name of the control
|
|
38
37
|
* @param text defines the text to display (empty string by default)
|
|
39
38
|
*/
|
|
40
|
-
|
|
39
|
+
constructor(
|
|
41
40
|
/**
|
|
42
41
|
* Defines the name of the control
|
|
43
42
|
*/
|
|
44
|
-
name, text) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
_this._wordDivider = " ";
|
|
43
|
+
name, text = "") {
|
|
44
|
+
super(name);
|
|
45
|
+
this.name = name;
|
|
46
|
+
this._text = "";
|
|
47
|
+
this._textWrapping = TextWrapping.Clip;
|
|
48
|
+
this._textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;
|
|
49
|
+
this._textVerticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;
|
|
50
|
+
this._resizeToFit = false;
|
|
51
|
+
this._lineSpacing = new ValueAndUnit(0);
|
|
52
|
+
this._outlineWidth = 0;
|
|
53
|
+
this._outlineColor = "white";
|
|
54
|
+
this._underline = false;
|
|
55
|
+
this._lineThrough = false;
|
|
56
|
+
this._wordDivider = " ";
|
|
59
57
|
/**
|
|
60
58
|
* An event triggered after the text is changed
|
|
61
59
|
*/
|
|
62
|
-
|
|
60
|
+
this.onTextChangedObservable = new Observable();
|
|
63
61
|
/**
|
|
64
62
|
* An event triggered after the text was broken up into lines
|
|
65
63
|
*/
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return _this;
|
|
64
|
+
this.onLinesReadyObservable = new Observable();
|
|
65
|
+
this.text = text;
|
|
69
66
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Gets or sets text vertical alignment (BABYLON.GUI.Control.VERTICAL_ALIGNMENT_CENTER by default)
|
|
168
|
-
*/
|
|
169
|
-
get: function () {
|
|
170
|
-
return this._textVerticalAlignment;
|
|
171
|
-
},
|
|
172
|
-
/**
|
|
173
|
-
* Gets or sets text vertical alignment (BABYLON.GUI.Control.VERTICAL_ALIGNMENT_CENTER by default)
|
|
174
|
-
*/
|
|
175
|
-
set: function (value) {
|
|
176
|
-
if (this._textVerticalAlignment === value) {
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
this._textVerticalAlignment = value;
|
|
180
|
-
this._markAsDirty();
|
|
181
|
-
},
|
|
182
|
-
enumerable: false,
|
|
183
|
-
configurable: true
|
|
184
|
-
});
|
|
185
|
-
Object.defineProperty(TextBlock.prototype, "lineSpacing", {
|
|
186
|
-
/**
|
|
187
|
-
* Gets or sets line spacing value
|
|
188
|
-
*/
|
|
189
|
-
get: function () {
|
|
190
|
-
return this._lineSpacing.toString(this._host);
|
|
191
|
-
},
|
|
192
|
-
/**
|
|
193
|
-
* Gets or sets line spacing value
|
|
194
|
-
*/
|
|
195
|
-
set: function (value) {
|
|
196
|
-
if (this._lineSpacing.fromString(value)) {
|
|
197
|
-
this._markAsDirty();
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
enumerable: false,
|
|
201
|
-
configurable: true
|
|
202
|
-
});
|
|
203
|
-
Object.defineProperty(TextBlock.prototype, "outlineWidth", {
|
|
204
|
-
/**
|
|
205
|
-
* Gets or sets outlineWidth of the text to display
|
|
206
|
-
*/
|
|
207
|
-
get: function () {
|
|
208
|
-
return this._outlineWidth;
|
|
209
|
-
},
|
|
210
|
-
/**
|
|
211
|
-
* Gets or sets outlineWidth of the text to display
|
|
212
|
-
*/
|
|
213
|
-
set: function (value) {
|
|
214
|
-
if (this._outlineWidth === value) {
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
this._outlineWidth = value;
|
|
218
|
-
this._markAsDirty();
|
|
219
|
-
},
|
|
220
|
-
enumerable: false,
|
|
221
|
-
configurable: true
|
|
222
|
-
});
|
|
223
|
-
Object.defineProperty(TextBlock.prototype, "underline", {
|
|
224
|
-
/**
|
|
225
|
-
* Gets or sets a boolean indicating that text must have underline
|
|
226
|
-
*/
|
|
227
|
-
get: function () {
|
|
228
|
-
return this._underline;
|
|
229
|
-
},
|
|
230
|
-
/**
|
|
231
|
-
* Gets or sets a boolean indicating that text must have underline
|
|
232
|
-
*/
|
|
233
|
-
set: function (value) {
|
|
234
|
-
if (this._underline === value) {
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
this._underline = value;
|
|
238
|
-
this._markAsDirty();
|
|
239
|
-
},
|
|
240
|
-
enumerable: false,
|
|
241
|
-
configurable: true
|
|
242
|
-
});
|
|
243
|
-
Object.defineProperty(TextBlock.prototype, "lineThrough", {
|
|
244
|
-
/**
|
|
245
|
-
* Gets or sets an boolean indicating that text must be crossed out
|
|
246
|
-
*/
|
|
247
|
-
get: function () {
|
|
248
|
-
return this._lineThrough;
|
|
249
|
-
},
|
|
250
|
-
/**
|
|
251
|
-
* Gets or sets an boolean indicating that text must be crossed out
|
|
252
|
-
*/
|
|
253
|
-
set: function (value) {
|
|
254
|
-
if (this._lineThrough === value) {
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
this._lineThrough = value;
|
|
258
|
-
this._markAsDirty();
|
|
259
|
-
},
|
|
260
|
-
enumerable: false,
|
|
261
|
-
configurable: true
|
|
262
|
-
});
|
|
263
|
-
Object.defineProperty(TextBlock.prototype, "outlineColor", {
|
|
264
|
-
/**
|
|
265
|
-
* Gets or sets outlineColor of the text to display
|
|
266
|
-
*/
|
|
267
|
-
get: function () {
|
|
268
|
-
return this._outlineColor;
|
|
269
|
-
},
|
|
270
|
-
/**
|
|
271
|
-
* Gets or sets outlineColor of the text to display
|
|
272
|
-
*/
|
|
273
|
-
set: function (value) {
|
|
274
|
-
if (this._outlineColor === value) {
|
|
275
|
-
return;
|
|
276
|
-
}
|
|
277
|
-
this._outlineColor = value;
|
|
278
|
-
this._markAsDirty();
|
|
279
|
-
},
|
|
280
|
-
enumerable: false,
|
|
281
|
-
configurable: true
|
|
282
|
-
});
|
|
283
|
-
Object.defineProperty(TextBlock.prototype, "wordDivider", {
|
|
284
|
-
/**
|
|
285
|
-
* Gets or sets word divider
|
|
286
|
-
*/
|
|
287
|
-
get: function () {
|
|
288
|
-
return this._wordDivider;
|
|
289
|
-
},
|
|
290
|
-
/**
|
|
291
|
-
* Gets or sets word divider
|
|
292
|
-
*/
|
|
293
|
-
set: function (value) {
|
|
294
|
-
if (this._wordDivider === value) {
|
|
295
|
-
return;
|
|
296
|
-
}
|
|
297
|
-
this._wordDivider = value;
|
|
67
|
+
/**
|
|
68
|
+
* Return the line list (you may need to use the onLinesReadyObservable to make sure the list is ready)
|
|
69
|
+
*/
|
|
70
|
+
get lines() {
|
|
71
|
+
return this._lines;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Gets or sets an boolean indicating that the TextBlock will be resized to fit container
|
|
75
|
+
*/
|
|
76
|
+
get resizeToFit() {
|
|
77
|
+
return this._resizeToFit;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Gets or sets an boolean indicating that the TextBlock will be resized to fit container
|
|
81
|
+
*/
|
|
82
|
+
set resizeToFit(value) {
|
|
83
|
+
if (this._resizeToFit === value) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
this._resizeToFit = value;
|
|
87
|
+
if (this._resizeToFit) {
|
|
88
|
+
this._width.ignoreAdaptiveScaling = true;
|
|
89
|
+
this._height.ignoreAdaptiveScaling = true;
|
|
90
|
+
}
|
|
91
|
+
this._markAsDirty();
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Gets or sets a boolean indicating if text must be wrapped
|
|
95
|
+
*/
|
|
96
|
+
get textWrapping() {
|
|
97
|
+
return this._textWrapping;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Gets or sets a boolean indicating if text must be wrapped
|
|
101
|
+
*/
|
|
102
|
+
set textWrapping(value) {
|
|
103
|
+
if (this._textWrapping === value) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
this._textWrapping = +value;
|
|
107
|
+
this._markAsDirty();
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Gets or sets text to display
|
|
111
|
+
*/
|
|
112
|
+
get text() {
|
|
113
|
+
return this._text;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Gets or sets text to display
|
|
117
|
+
*/
|
|
118
|
+
set text(value) {
|
|
119
|
+
if (this._text === value) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
this._text = value + ""; // Making sure it is a text
|
|
123
|
+
this._markAsDirty();
|
|
124
|
+
this.onTextChangedObservable.notifyObservers(this);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Gets or sets text horizontal alignment (BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_CENTER by default)
|
|
128
|
+
*/
|
|
129
|
+
get textHorizontalAlignment() {
|
|
130
|
+
return this._textHorizontalAlignment;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Gets or sets text horizontal alignment (BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_CENTER by default)
|
|
134
|
+
*/
|
|
135
|
+
set textHorizontalAlignment(value) {
|
|
136
|
+
if (this._textHorizontalAlignment === value) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
this._textHorizontalAlignment = value;
|
|
140
|
+
this._markAsDirty();
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Gets or sets text vertical alignment (BABYLON.GUI.Control.VERTICAL_ALIGNMENT_CENTER by default)
|
|
144
|
+
*/
|
|
145
|
+
get textVerticalAlignment() {
|
|
146
|
+
return this._textVerticalAlignment;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Gets or sets text vertical alignment (BABYLON.GUI.Control.VERTICAL_ALIGNMENT_CENTER by default)
|
|
150
|
+
*/
|
|
151
|
+
set textVerticalAlignment(value) {
|
|
152
|
+
if (this._textVerticalAlignment === value) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
this._textVerticalAlignment = value;
|
|
156
|
+
this._markAsDirty();
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Gets or sets line spacing value
|
|
160
|
+
*/
|
|
161
|
+
set lineSpacing(value) {
|
|
162
|
+
if (this._lineSpacing.fromString(value)) {
|
|
298
163
|
this._markAsDirty();
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Gets or sets line spacing value
|
|
168
|
+
*/
|
|
169
|
+
get lineSpacing() {
|
|
170
|
+
return this._lineSpacing.toString(this._host);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Gets or sets outlineWidth of the text to display
|
|
174
|
+
*/
|
|
175
|
+
get outlineWidth() {
|
|
176
|
+
return this._outlineWidth;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Gets or sets outlineWidth of the text to display
|
|
180
|
+
*/
|
|
181
|
+
set outlineWidth(value) {
|
|
182
|
+
if (this._outlineWidth === value) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
this._outlineWidth = value;
|
|
186
|
+
this._markAsDirty();
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Gets or sets a boolean indicating that text must have underline
|
|
190
|
+
*/
|
|
191
|
+
get underline() {
|
|
192
|
+
return this._underline;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Gets or sets a boolean indicating that text must have underline
|
|
196
|
+
*/
|
|
197
|
+
set underline(value) {
|
|
198
|
+
if (this._underline === value) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
this._underline = value;
|
|
202
|
+
this._markAsDirty();
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Gets or sets an boolean indicating that text must be crossed out
|
|
206
|
+
*/
|
|
207
|
+
get lineThrough() {
|
|
208
|
+
return this._lineThrough;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Gets or sets an boolean indicating that text must be crossed out
|
|
212
|
+
*/
|
|
213
|
+
set lineThrough(value) {
|
|
214
|
+
if (this._lineThrough === value) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
this._lineThrough = value;
|
|
218
|
+
this._markAsDirty();
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Gets or sets outlineColor of the text to display
|
|
222
|
+
*/
|
|
223
|
+
get outlineColor() {
|
|
224
|
+
return this._outlineColor;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Gets or sets outlineColor of the text to display
|
|
228
|
+
*/
|
|
229
|
+
set outlineColor(value) {
|
|
230
|
+
if (this._outlineColor === value) {
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
this._outlineColor = value;
|
|
234
|
+
this._markAsDirty();
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Gets or sets word divider
|
|
238
|
+
*/
|
|
239
|
+
get wordDivider() {
|
|
240
|
+
return this._wordDivider;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Gets or sets word divider
|
|
244
|
+
*/
|
|
245
|
+
set wordDivider(value) {
|
|
246
|
+
if (this._wordDivider === value) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
this._wordDivider = value;
|
|
250
|
+
this._markAsDirty();
|
|
251
|
+
}
|
|
252
|
+
_getTypeName() {
|
|
304
253
|
return "TextBlock";
|
|
305
|
-
}
|
|
306
|
-
|
|
254
|
+
}
|
|
255
|
+
_processMeasures(parentMeasure, context) {
|
|
307
256
|
if (!this._fontOffset || this.isDirty) {
|
|
308
257
|
this._fontOffset = Control._GetFontOffset(context.font);
|
|
309
258
|
}
|
|
310
|
-
|
|
259
|
+
super._processMeasures(parentMeasure, context);
|
|
311
260
|
// Prepare lines
|
|
312
261
|
this._lines = this._breakLines(this._currentMeasure.width, this._currentMeasure.height, context);
|
|
313
262
|
this.onLinesReadyObservable.notifyObservers(this);
|
|
314
|
-
|
|
315
|
-
for (
|
|
316
|
-
|
|
263
|
+
let maxLineWidth = 0;
|
|
264
|
+
for (let i = 0; i < this._lines.length; i++) {
|
|
265
|
+
const line = this._lines[i];
|
|
317
266
|
if (line.width > maxLineWidth) {
|
|
318
267
|
maxLineWidth = line.width;
|
|
319
268
|
}
|
|
320
269
|
}
|
|
321
270
|
if (this._resizeToFit) {
|
|
322
271
|
if (this._textWrapping === TextWrapping.Clip) {
|
|
323
|
-
|
|
272
|
+
const newWidth = (this._paddingLeftInPixels + this._paddingRightInPixels + maxLineWidth) | 0;
|
|
324
273
|
if (newWidth !== this._width.internalValue) {
|
|
325
274
|
this._width.updateInPlace(newWidth, ValueAndUnit.UNITMODE_PIXEL);
|
|
326
275
|
this._rebuildLayout = true;
|
|
327
276
|
}
|
|
328
277
|
}
|
|
329
|
-
|
|
278
|
+
let newHeight = (this._paddingTopInPixels + this._paddingBottomInPixels + this._fontOffset.height * this._lines.length) | 0;
|
|
330
279
|
if (this._lines.length > 0 && this._lineSpacing.internalValue !== 0) {
|
|
331
|
-
|
|
280
|
+
let lineSpacing = 0;
|
|
332
281
|
if (this._lineSpacing.isPixel) {
|
|
333
282
|
lineSpacing = this._lineSpacing.getValue(this._host);
|
|
334
283
|
}
|
|
@@ -342,10 +291,10 @@ var TextBlock = /** @class */ (function (_super) {
|
|
|
342
291
|
this._rebuildLayout = true;
|
|
343
292
|
}
|
|
344
293
|
}
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
294
|
+
}
|
|
295
|
+
_drawText(text, textWidth, y, context) {
|
|
296
|
+
const width = this._currentMeasure.width;
|
|
297
|
+
let x = 0;
|
|
349
298
|
switch (this._textHorizontalAlignment) {
|
|
350
299
|
case Control.HORIZONTAL_ALIGNMENT_LEFT:
|
|
351
300
|
x = 0;
|
|
@@ -383,75 +332,69 @@ var TextBlock = /** @class */ (function (_super) {
|
|
|
383
332
|
context.stroke();
|
|
384
333
|
context.closePath();
|
|
385
334
|
}
|
|
386
|
-
}
|
|
335
|
+
}
|
|
387
336
|
/**
|
|
388
337
|
* @param context
|
|
389
338
|
* @hidden
|
|
390
339
|
*/
|
|
391
|
-
|
|
340
|
+
_draw(context) {
|
|
392
341
|
context.save();
|
|
393
342
|
this._applyStates(context);
|
|
394
343
|
// Render lines
|
|
395
344
|
this._renderLines(context);
|
|
396
345
|
context.restore();
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
|
|
346
|
+
}
|
|
347
|
+
_applyStates(context) {
|
|
348
|
+
super._applyStates(context);
|
|
400
349
|
if (this.outlineWidth) {
|
|
401
350
|
context.lineWidth = this.outlineWidth;
|
|
402
351
|
context.strokeStyle = this.outlineColor;
|
|
403
352
|
context.lineJoin = "miter";
|
|
404
353
|
context.miterLimit = 2;
|
|
405
354
|
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
355
|
+
}
|
|
356
|
+
_breakLines(refWidth, refHeight, context) {
|
|
357
|
+
const lines = [];
|
|
358
|
+
const _lines = this.text.split("\n");
|
|
410
359
|
if (this._textWrapping === TextWrapping.Ellipsis) {
|
|
411
|
-
for (
|
|
412
|
-
var _line = _lines_1[_i];
|
|
360
|
+
for (const _line of _lines) {
|
|
413
361
|
lines.push(this._parseLineEllipsis(_line, refWidth, context));
|
|
414
362
|
}
|
|
415
363
|
}
|
|
416
364
|
else if (this._textWrapping === TextWrapping.WordWrap) {
|
|
417
|
-
for (
|
|
418
|
-
|
|
419
|
-
lines.push.apply(lines, this._parseLineWordWrap(_line, refWidth, context));
|
|
365
|
+
for (const _line of _lines) {
|
|
366
|
+
lines.push(...this._parseLineWordWrap(_line, refWidth, context));
|
|
420
367
|
}
|
|
421
368
|
}
|
|
422
369
|
else if (this._textWrapping === TextWrapping.WordWrapEllipsis) {
|
|
423
|
-
for (
|
|
424
|
-
|
|
425
|
-
lines.push.apply(lines, this._parseLineWordWrapEllipsis(_line, refWidth, refHeight, context));
|
|
370
|
+
for (const _line of _lines) {
|
|
371
|
+
lines.push(...this._parseLineWordWrapEllipsis(_line, refWidth, refHeight, context));
|
|
426
372
|
}
|
|
427
373
|
}
|
|
428
374
|
else {
|
|
429
|
-
for (
|
|
430
|
-
var _line = _lines_4[_c];
|
|
375
|
+
for (const _line of _lines) {
|
|
431
376
|
lines.push(this._parseLine(_line, context));
|
|
432
377
|
}
|
|
433
378
|
}
|
|
434
379
|
return lines;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
if (line === void 0) { line = ""; }
|
|
380
|
+
}
|
|
381
|
+
_parseLine(line = "", context) {
|
|
438
382
|
return { text: line, width: this._getTextMetricsWidth(context.measureText(line)) };
|
|
439
|
-
}
|
|
383
|
+
}
|
|
440
384
|
//Calculate how many characters approximately we need to remove
|
|
441
|
-
|
|
442
|
-
|
|
385
|
+
_getCharsToRemove(lineWidth, width, lineLength) {
|
|
386
|
+
const diff = lineWidth > width ? lineWidth - width : 0;
|
|
443
387
|
// This isn't exact unless the font is monospaced
|
|
444
|
-
|
|
445
|
-
|
|
388
|
+
const charWidth = lineWidth / lineLength;
|
|
389
|
+
const removeChars = Math.max(Math.floor(diff / charWidth), 1);
|
|
446
390
|
return removeChars;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
var removeChars = this._getCharsToRemove(lineWidth, width, line.length);
|
|
391
|
+
}
|
|
392
|
+
_parseLineEllipsis(line = "", width, context) {
|
|
393
|
+
let lineWidth = this._getTextMetricsWidth(context.measureText(line));
|
|
394
|
+
let removeChars = this._getCharsToRemove(lineWidth, width, line.length);
|
|
452
395
|
// unicode support. split('') does not work with unicode!
|
|
453
396
|
// make sure Array.from is available
|
|
454
|
-
|
|
397
|
+
const characters = Array.from && Array.from(line);
|
|
455
398
|
if (!characters) {
|
|
456
399
|
// no array.from, use the old method
|
|
457
400
|
while (line.length > 2 && lineWidth > width) {
|
|
@@ -465,27 +408,26 @@ var TextBlock = /** @class */ (function (_super) {
|
|
|
465
408
|
else {
|
|
466
409
|
while (characters.length && lineWidth > width) {
|
|
467
410
|
characters.splice(characters.length - removeChars, removeChars);
|
|
468
|
-
line =
|
|
411
|
+
line = `${characters.join("")}…`;
|
|
469
412
|
lineWidth = this._getTextMetricsWidth(context.measureText(line));
|
|
470
413
|
removeChars = this._getCharsToRemove(lineWidth, width, line.length);
|
|
471
414
|
}
|
|
472
415
|
}
|
|
473
416
|
return { text: line, width: lineWidth };
|
|
474
|
-
}
|
|
475
|
-
|
|
417
|
+
}
|
|
418
|
+
_getTextMetricsWidth(textMetrics) {
|
|
476
419
|
if (textMetrics.actualBoundingBoxLeft !== undefined) {
|
|
477
420
|
return Math.abs(textMetrics.actualBoundingBoxLeft) + Math.abs(textMetrics.actualBoundingBoxRight);
|
|
478
421
|
}
|
|
479
422
|
return textMetrics.width;
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
var testWidth = this._getTextMetricsWidth(context.measureText(testLine));
|
|
423
|
+
}
|
|
424
|
+
_parseLineWordWrap(line = "", width, context) {
|
|
425
|
+
const lines = [];
|
|
426
|
+
const words = this.wordSplittingFunction ? this.wordSplittingFunction(line) : line.split(this._wordDivider);
|
|
427
|
+
let lineWidth = this._getTextMetricsWidth(context.measureText(line));
|
|
428
|
+
for (let n = 0; n < words.length; n++) {
|
|
429
|
+
const testLine = n > 0 ? line + this._wordDivider + words[n] : words[0];
|
|
430
|
+
const testWidth = this._getTextMetricsWidth(context.measureText(testLine));
|
|
489
431
|
if (testWidth > width && n > 0) {
|
|
490
432
|
lines.push({ text: line, width: lineWidth });
|
|
491
433
|
line = words[n];
|
|
@@ -498,31 +440,30 @@ var TextBlock = /** @class */ (function (_super) {
|
|
|
498
440
|
}
|
|
499
441
|
lines.push({ text: line, width: lineWidth });
|
|
500
442
|
return lines;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
var currentHeight = this._computeHeightForLinesOf(n);
|
|
443
|
+
}
|
|
444
|
+
_parseLineWordWrapEllipsis(line = "", width, height, context) {
|
|
445
|
+
const lines = this._parseLineWordWrap(line, width, context);
|
|
446
|
+
for (let n = 1; n <= lines.length; n++) {
|
|
447
|
+
const currentHeight = this._computeHeightForLinesOf(n);
|
|
507
448
|
if (currentHeight > height && n > 1) {
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
lines[n - 2] = this._parseLineEllipsis(
|
|
511
|
-
|
|
512
|
-
for (
|
|
449
|
+
const lastLine = lines[n - 2];
|
|
450
|
+
const currentLine = lines[n - 1];
|
|
451
|
+
lines[n - 2] = this._parseLineEllipsis(`${lastLine.text + currentLine.text}`, width, context);
|
|
452
|
+
const linesToRemove = lines.length - n + 1;
|
|
453
|
+
for (let i = 0; i < linesToRemove; i++) {
|
|
513
454
|
lines.pop();
|
|
514
455
|
}
|
|
515
456
|
return lines;
|
|
516
457
|
}
|
|
517
458
|
}
|
|
518
459
|
return lines;
|
|
519
|
-
}
|
|
520
|
-
|
|
460
|
+
}
|
|
461
|
+
_renderLines(context) {
|
|
521
462
|
if (!this._fontOffset || !this._lines) {
|
|
522
463
|
return;
|
|
523
464
|
}
|
|
524
|
-
|
|
525
|
-
|
|
465
|
+
const height = this._currentMeasure.height;
|
|
466
|
+
let rootY = 0;
|
|
526
467
|
switch (this._textVerticalAlignment) {
|
|
527
468
|
case Control.VERTICAL_ALIGNMENT_TOP:
|
|
528
469
|
rootY = this._fontOffset.ascent;
|
|
@@ -535,8 +476,8 @@ var TextBlock = /** @class */ (function (_super) {
|
|
|
535
476
|
break;
|
|
536
477
|
}
|
|
537
478
|
rootY += this._currentMeasure.top;
|
|
538
|
-
for (
|
|
539
|
-
|
|
479
|
+
for (let i = 0; i < this._lines.length; i++) {
|
|
480
|
+
const line = this._lines[i];
|
|
540
481
|
if (i !== 0 && this._lineSpacing.internalValue !== 0) {
|
|
541
482
|
if (this._lineSpacing.isPixel) {
|
|
542
483
|
rootY += this._lineSpacing.getValue(this._host);
|
|
@@ -548,11 +489,11 @@ var TextBlock = /** @class */ (function (_super) {
|
|
|
548
489
|
this._drawText(line.text, line.width, rootY, context);
|
|
549
490
|
rootY += this._fontOffset.height;
|
|
550
491
|
}
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
|
|
492
|
+
}
|
|
493
|
+
_computeHeightForLinesOf(lineCount) {
|
|
494
|
+
let newHeight = this._paddingTopInPixels + this._paddingBottomInPixels + this._fontOffset.height * lineCount;
|
|
554
495
|
if (lineCount > 0 && this._lineSpacing.internalValue !== 0) {
|
|
555
|
-
|
|
496
|
+
let lineSpacing = 0;
|
|
556
497
|
if (this._lineSpacing.isPixel) {
|
|
557
498
|
lineSpacing = this._lineSpacing.getValue(this._host);
|
|
558
499
|
}
|
|
@@ -562,68 +503,65 @@ var TextBlock = /** @class */ (function (_super) {
|
|
|
562
503
|
newHeight += (lineCount - 1) * lineSpacing;
|
|
563
504
|
}
|
|
564
505
|
return newHeight;
|
|
565
|
-
}
|
|
506
|
+
}
|
|
566
507
|
/**
|
|
567
508
|
* Given a width constraint applied on the text block, find the expected height
|
|
568
509
|
* @returns expected height
|
|
569
510
|
*/
|
|
570
|
-
|
|
571
|
-
var _a;
|
|
511
|
+
computeExpectedHeight() {
|
|
572
512
|
if (this.text && this.widthInPixels) {
|
|
573
513
|
// Should abstract platform instead of using LastCreatedEngine
|
|
574
|
-
|
|
575
|
-
if (
|
|
576
|
-
this._applyStates(
|
|
514
|
+
const context = EngineStore.LastCreatedEngine?.createCanvas(0, 0).getContext("2d");
|
|
515
|
+
if (context) {
|
|
516
|
+
this._applyStates(context);
|
|
577
517
|
if (!this._fontOffset) {
|
|
578
|
-
this._fontOffset = Control._GetFontOffset(
|
|
518
|
+
this._fontOffset = Control._GetFontOffset(context.font);
|
|
579
519
|
}
|
|
580
|
-
|
|
520
|
+
const lines = this._lines
|
|
581
521
|
? this._lines
|
|
582
|
-
: this._breakLines(this.widthInPixels - this._paddingLeftInPixels - this._paddingRightInPixels, this.heightInPixels - this._paddingTopInPixels - this._paddingBottomInPixels,
|
|
522
|
+
: this._breakLines(this.widthInPixels - this._paddingLeftInPixels - this._paddingRightInPixels, this.heightInPixels - this._paddingTopInPixels - this._paddingBottomInPixels, context);
|
|
583
523
|
return this._computeHeightForLinesOf(lines.length);
|
|
584
524
|
}
|
|
585
525
|
}
|
|
586
526
|
return 0;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
|
|
527
|
+
}
|
|
528
|
+
dispose() {
|
|
529
|
+
super.dispose();
|
|
590
530
|
this.onTextChangedObservable.clear();
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
}(Control));
|
|
627
|
-
export { TextBlock };
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
__decorate([
|
|
534
|
+
serialize()
|
|
535
|
+
], TextBlock.prototype, "resizeToFit", null);
|
|
536
|
+
__decorate([
|
|
537
|
+
serialize()
|
|
538
|
+
], TextBlock.prototype, "textWrapping", null);
|
|
539
|
+
__decorate([
|
|
540
|
+
serialize()
|
|
541
|
+
], TextBlock.prototype, "text", null);
|
|
542
|
+
__decorate([
|
|
543
|
+
serialize()
|
|
544
|
+
], TextBlock.prototype, "textHorizontalAlignment", null);
|
|
545
|
+
__decorate([
|
|
546
|
+
serialize()
|
|
547
|
+
], TextBlock.prototype, "textVerticalAlignment", null);
|
|
548
|
+
__decorate([
|
|
549
|
+
serialize()
|
|
550
|
+
], TextBlock.prototype, "lineSpacing", null);
|
|
551
|
+
__decorate([
|
|
552
|
+
serialize()
|
|
553
|
+
], TextBlock.prototype, "outlineWidth", null);
|
|
554
|
+
__decorate([
|
|
555
|
+
serialize()
|
|
556
|
+
], TextBlock.prototype, "underline", null);
|
|
557
|
+
__decorate([
|
|
558
|
+
serialize()
|
|
559
|
+
], TextBlock.prototype, "lineThrough", null);
|
|
560
|
+
__decorate([
|
|
561
|
+
serialize()
|
|
562
|
+
], TextBlock.prototype, "outlineColor", null);
|
|
563
|
+
__decorate([
|
|
564
|
+
serialize()
|
|
565
|
+
], TextBlock.prototype, "wordDivider", null);
|
|
628
566
|
RegisterClass("BABYLON.GUI.TextBlock", TextBlock);
|
|
629
567
|
//# sourceMappingURL=textBlock.js.map
|