@flashist/flibs 0.0.248 → 0.0.249

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.
Files changed (141) hide show
  1. package/TestLibClass.js +3 -5
  2. package/TestLibClass.js.map +1 -1
  3. package/base/data/BaseDataVO.js +57 -100
  4. package/base/data/BaseDataVO.js.map +1 -1
  5. package/base/data/BaseDataVOEvent.js +1 -1
  6. package/base/data/BaseDataVOEvent.js.map +1 -1
  7. package/device/tools/DeviceFullscreenTools.js +106 -125
  8. package/device/tools/DeviceFullscreenTools.js.map +1 -1
  9. package/device/tools/DeviceTools.js +12 -16
  10. package/device/tools/DeviceTools.js.map +1 -1
  11. package/display/pixijs/custom/FApp.js +24 -47
  12. package/display/pixijs/custom/FApp.js.map +1 -1
  13. package/display/pixijs/custom/display/FContainer.js +89 -125
  14. package/display/pixijs/custom/display/FContainer.js.map +1 -1
  15. package/display/pixijs/custom/display/FStage.js +7 -26
  16. package/display/pixijs/custom/display/FStage.js.map +1 -1
  17. package/display/pixijs/custom/display/events/FDisplayEvent.js +1 -1
  18. package/display/pixijs/custom/display/events/FDisplayEvent.js.map +1 -1
  19. package/display/pixijs/custom/display/text/FLabel.js +331 -465
  20. package/display/pixijs/custom/display/text/FLabel.js.map +1 -1
  21. package/display/pixijs/custom/display/text/FLabelDefaultConfig.js +3 -5
  22. package/display/pixijs/custom/display/text/FLabelDefaultConfig.js.map +1 -1
  23. package/display/pixijs/custom/display/text/FLabelEvent.js +1 -1
  24. package/display/pixijs/custom/display/text/FLabelEvent.js.map +1 -1
  25. package/display/pixijs/custom/display/tools/FDisplayTools.js +18 -23
  26. package/display/pixijs/custom/display/tools/FDisplayTools.js.map +1 -1
  27. package/display/pixijs/display/events/DisplayEvent.js +1 -1
  28. package/display/pixijs/display/events/DisplayEvent.js.map +1 -1
  29. package/display/pixijs/display/events/InteractiveEvent.js +1 -1
  30. package/display/pixijs/display/events/InteractiveEvent.js.map +1 -1
  31. package/display/pixijs/display/tools/DisplayResizeTools.js +10 -14
  32. package/display/pixijs/display/tools/DisplayResizeTools.js.map +1 -1
  33. package/display/pixijs/display/tools/DisplayTools.js +14 -19
  34. package/display/pixijs/display/tools/DisplayTools.js.map +1 -1
  35. package/display/pixijs/display/tools/FLabelTools.js +9 -15
  36. package/display/pixijs/display/tools/FLabelTools.js.map +1 -1
  37. package/display/pixijs/display/tools/GraphicsTools.js +5 -13
  38. package/display/pixijs/display/tools/GraphicsTools.js.map +1 -1
  39. package/html/tools/HtmlTools.js +6 -10
  40. package/html/tools/HtmlTools.js.map +1 -1
  41. package/input/pixijs/InputManager.js +58 -88
  42. package/input/pixijs/InputManager.js.map +1 -1
  43. package/input/pixijs/InputManagerEvent.js +1 -1
  44. package/input/pixijs/InputManagerEvent.js.map +1 -1
  45. package/input/pixijs/InputManagerEventData.js +3 -5
  46. package/input/pixijs/InputManagerEventData.js.map +1 -1
  47. package/load/abstract/AbstractLoadFactory.js +12 -14
  48. package/load/abstract/AbstractLoadFactory.js.map +1 -1
  49. package/load/abstract/AbstractLoadManager.js +41 -70
  50. package/load/abstract/AbstractLoadManager.js.map +1 -1
  51. package/load/abstract/LoadEvent.js +1 -1
  52. package/load/abstract/LoadEvent.js.map +1 -1
  53. package/load/abstract/LoadResourcesCache.js +11 -15
  54. package/load/abstract/LoadResourcesCache.js.map +1 -1
  55. package/load/abstract/Loader.js +51 -79
  56. package/load/abstract/Loader.js.map +1 -1
  57. package/load/abstract/LoaderQueue.js +16 -18
  58. package/load/abstract/LoaderQueue.js.map +1 -1
  59. package/load/abstract/commands/LoadItemCommand.js +16 -36
  60. package/load/abstract/commands/LoadItemCommand.js.map +1 -1
  61. package/load/abstract/commands/LoadItemsListCommand.js +16 -37
  62. package/load/abstract/commands/LoadItemsListCommand.js.map +1 -1
  63. package/load/abstract/commands/WaitGroupLoadingCompleteCommand.js +11 -31
  64. package/load/abstract/commands/WaitGroupLoadingCompleteCommand.js.map +1 -1
  65. package/load/abstract/data/FileType.js +1 -1
  66. package/load/abstract/data/FileType.js.map +1 -1
  67. package/load/abstract/group/LoadGroup.js +38 -67
  68. package/load/abstract/group/LoadGroup.js.map +1 -1
  69. package/load/abstract/item/AbstractLoadItem.js +51 -76
  70. package/load/abstract/item/AbstractLoadItem.js.map +1 -1
  71. package/load/abstract/item/AbstractSoundLoadItem.js +2 -23
  72. package/load/abstract/item/AbstractSoundLoadItem.js.map +1 -1
  73. package/load/abstract/item/DefaultLoadItemConfig.js +9 -11
  74. package/load/abstract/item/DefaultLoadItemConfig.js.map +1 -1
  75. package/load/abstract/loadstatus/LoadStatusEvent.js +1 -1
  76. package/load/abstract/loadstatus/LoadStatusEvent.js.map +1 -1
  77. package/load/abstract/loadstatus/LoadStatusPriority.js +2 -2
  78. package/load/abstract/loadstatus/LoadStatusPriority.js.map +1 -1
  79. package/load/abstract/loadstatus/LoadStatusPriorityTools.js +8 -13
  80. package/load/abstract/loadstatus/LoadStatusPriorityTools.js.map +1 -1
  81. package/load/abstract/progress/LoadProgressTool.js +10 -15
  82. package/load/abstract/progress/LoadProgressTool.js.map +1 -1
  83. package/load/preloadjspixihowler/PreloadjsPixiLoadFactory.js +12 -37
  84. package/load/preloadjspixihowler/PreloadjsPixiLoadFactory.js.map +1 -1
  85. package/load/preloadjspixihowler/PreloadjsPixiLoadManager.js +6 -31
  86. package/load/preloadjspixihowler/PreloadjsPixiLoadManager.js.map +1 -1
  87. package/load/preloadjspixihowler/item/FileLoadItem.js +30 -52
  88. package/load/preloadjspixihowler/item/FileLoadItem.js.map +1 -1
  89. package/load/preloadjspixihowler/item/FontLoadItem.js +40 -56
  90. package/load/preloadjspixihowler/item/FontLoadItem.js.map +1 -1
  91. package/load/preloadjspixihowler/item/HowlerSoundLoadItem.js +30 -50
  92. package/load/preloadjspixihowler/item/HowlerSoundLoadItem.js.map +1 -1
  93. package/load/preloadjspixihowler/item/PixiImageLoadItem.js +4 -25
  94. package/load/preloadjspixihowler/item/PixiImageLoadItem.js.map +1 -1
  95. package/load/preloadjspixihowler/item/PixiSpineLoadItem.js +4 -25
  96. package/load/preloadjspixihowler/item/PixiSpineLoadItem.js.map +1 -1
  97. package/load/preloadjspixihowler/item/PreloadjsLoadQueueEventType.js +1 -1
  98. package/load/preloadjspixihowler/item/PreloadjsLoadQueueEventType.js.map +1 -1
  99. package/load/tools/LoadTools.js +4 -8
  100. package/load/tools/LoadTools.js.map +1 -1
  101. package/locale/ILocaleConfig.js +2 -6
  102. package/locale/ILocaleConfig.js.map +1 -1
  103. package/locale/LanguageId.js +4 -8
  104. package/locale/LanguageId.js.map +1 -1
  105. package/locale/LocaleManager.js +37 -48
  106. package/locale/LocaleManager.js.map +1 -1
  107. package/model/generic/GenericObjectsByTypeModel.js +21 -25
  108. package/model/generic/GenericObjectsByTypeModel.js.map +1 -1
  109. package/model/generic/GenericObjectsModel.js +27 -58
  110. package/model/generic/GenericObjectsModel.js.map +1 -1
  111. package/model/generic/GenericObjectsModelEvent.js +1 -1
  112. package/model/generic/GenericObjectsModelEvent.js.map +1 -1
  113. package/other/KeyCodes.js +1 -1
  114. package/other/KeyCodes.js.map +1 -1
  115. package/other/cursor/CSSCursor.js +1 -1
  116. package/other/cursor/CSSCursor.js.map +1 -1
  117. package/other/dragHelper/DragHelper.js +97 -156
  118. package/other/dragHelper/DragHelper.js.map +1 -1
  119. package/other/dragHelper/DragHelperEvent.js +5 -9
  120. package/other/dragHelper/DragHelperEvent.js.map +1 -1
  121. package/package.json +1 -1
  122. package/pool/ServiceLocatorObjectsPool.js +4 -38
  123. package/pool/ServiceLocatorObjectsPool.js.map +1 -1
  124. package/servicelocator/ServiceLocator.js +50 -71
  125. package/servicelocator/ServiceLocator.js.map +1 -1
  126. package/servicelocator/ServiceLocatorShortcuts.js +4 -4
  127. package/servicelocator/ServiceLocatorShortcuts.js.map +1 -1
  128. package/sounds/abstract/AbstractSound.js +22 -44
  129. package/sounds/abstract/AbstractSound.js.map +1 -1
  130. package/sounds/abstract/AbstractSoundsManager.js +70 -109
  131. package/sounds/abstract/AbstractSoundsManager.js.map +1 -1
  132. package/sounds/abstract/SoundsManagerEvent.js +1 -1
  133. package/sounds/abstract/SoundsManagerEvent.js.map +1 -1
  134. package/sounds/howler/HowlerSound.js +20 -44
  135. package/sounds/howler/HowlerSound.js.map +1 -1
  136. package/sounds/howler/HowlerSoundEvent.js +1 -1
  137. package/sounds/howler/HowlerSoundEvent.js.map +1 -1
  138. package/sounds/howler/HowlerSoundsManager.js +6 -33
  139. package/sounds/howler/HowlerSoundsManager.js.map +1 -1
  140. package/timeout/tools/TimeoutTools.js +9 -42
  141. package/timeout/tools/TimeoutTools.js.map +1 -1
@@ -1,39 +1,23 @@
1
- var __extends = (this && this.__extends) || (function () {
2
- var extendStatics = function (d, b) {
3
- extendStatics = Object.setPrototypeOf ||
4
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
- return extendStatics(d, b);
7
- };
8
- return function (d, b) {
9
- if (typeof b !== "function" && b !== null)
10
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
- extendStatics(d, b);
12
- function __() { this.constructor = d; }
13
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
- };
15
- })();
16
1
  import { ObjectTools } from "@flashist/fcore";
17
2
  import { Rectangle } from "pixi.js";
18
3
  import { Text, BitmapText, Graphics, Align, VAlign, FLabelEvent, AutosizeType, DisplayResizeTools, FLabelTools } from "../../../../../index";
19
4
  import { FLabelDefaultConfig } from "./FLabelDefaultConfig";
20
5
  import { FContainer } from "../FContainer";
21
- var FLabel = /** @class */ (function (_super) {
22
- __extends(FLabel, _super);
23
- function FLabel(config) {
24
- return _super.call(this, config) || this;
6
+ export class FLabel extends FContainer {
7
+ constructor(config) {
8
+ super(config);
25
9
  }
26
- FLabel.prototype.construction = function (config) {
27
- _super.prototype.construction.call(this);
10
+ construction(config) {
11
+ super.construction();
28
12
  this.fieldLocalBounds = new Rectangle();
29
13
  // Properties overriding
30
14
  //
31
15
  // width
32
16
  Object.defineProperty(this, "width", {
33
- get: function () {
17
+ get() {
34
18
  return this._width;
35
19
  },
36
- set: function (value) {
20
+ set(value) {
37
21
  if (value === this._width) {
38
22
  return;
39
23
  }
@@ -43,10 +27,10 @@ var FLabel = /** @class */ (function (_super) {
43
27
  });
44
28
  // height
45
29
  Object.defineProperty(this, "height", {
46
- get: function () {
30
+ get() {
47
31
  return this._height;
48
32
  },
49
- set: function (value) {
33
+ set(value) {
50
34
  if (value === this._height) {
51
35
  return;
52
36
  }
@@ -70,20 +54,20 @@ var FLabel = /** @class */ (function (_super) {
70
54
  this._width = this.field.width;
71
55
  this._height = this.field.height;
72
56
  this.updateBg();
73
- };
74
- FLabel.prototype.destruction = function () {
75
- _super.prototype.destruction.call(this);
57
+ }
58
+ destruction() {
59
+ super.destruction();
76
60
  if (this.field) {
77
61
  this.field.destroy();
78
62
  }
79
- };
80
- FLabel.prototype.createField = function () {
63
+ }
64
+ createField() {
81
65
  if (this.field) {
82
66
  this.field.parent.removeChild(this.field);
83
67
  this.field = null;
84
68
  }
85
69
  if (this.config.isBitmap) {
86
- var bitmapConfig = {
70
+ let bitmapConfig = {
87
71
  fontName: this.config.fontFamily
88
72
  };
89
73
  if (this.config.size) {
@@ -100,11 +84,11 @@ var FLabel = /** @class */ (function (_super) {
100
84
  this.applyStyle();
101
85
  this.addChild(this.field);
102
86
  this.field.mask = this.fieldMask;
103
- };
104
- FLabel.prototype.applyStyle = function () {
87
+ }
88
+ applyStyle() {
105
89
  if (this.config.isBitmap) {
106
90
  // ToDo: implement configuring bitmap fields
107
- var bitmapField = this.field;
91
+ const bitmapField = this.field;
108
92
  if (this.config.fontFamily) {
109
93
  bitmapField.fontName = this.config.fontFamily;
110
94
  }
@@ -119,7 +103,7 @@ var FLabel = /** @class */ (function (_super) {
119
103
  }
120
104
  }
121
105
  else {
122
- var textField = this.field;
106
+ const textField = this.field;
123
107
  if (this.config.fontFamily) {
124
108
  textField.style.fontFamily = this.config.fontFamily;
125
109
  }
@@ -196,13 +180,13 @@ var FLabel = /** @class */ (function (_super) {
196
180
  }
197
181
  }
198
182
  this.arrange();
199
- };
200
- FLabel.prototype.commitData = function () {
201
- _super.prototype.commitData.call(this);
183
+ }
184
+ commitData() {
185
+ super.commitData();
202
186
  this.arrange();
203
- };
204
- FLabel.prototype.arrange = function () {
205
- _super.prototype.arrange.call(this);
187
+ }
188
+ arrange() {
189
+ super.arrange();
206
190
  // Reset Field Scale
207
191
  this.field.scale.set(1);
208
192
  //
@@ -223,7 +207,7 @@ var FLabel = /** @class */ (function (_super) {
223
207
  }
224
208
  }
225
209
  }
226
- var tempFieldScale = 1;
210
+ let tempFieldScale = 1;
227
211
  if (this.fitToSize) {
228
212
  // IMPORTANT: this is a performance-requiring task!
229
213
  if (this.changeFontSizeToFit) {
@@ -238,7 +222,7 @@ var FLabel = /** @class */ (function (_super) {
238
222
  this.fieldLocalBounds = this.field.getLocalBounds();
239
223
  this.bg.width = this._width;
240
224
  this.bg.height = this._height;
241
- var newX = this.fieldPaddingX;
225
+ let newX = this.fieldPaddingX;
242
226
  switch (this.align) {
243
227
  case Align.CENTER:
244
228
  newX = Math.floor((this._width - (this.textWidth * this.field.scale.x)) * 0.5);
@@ -248,7 +232,7 @@ var FLabel = /** @class */ (function (_super) {
248
232
  break;
249
233
  }
250
234
  this.field.x = newX;
251
- var newY = this.fieldPaddingY;
235
+ let newY = this.fieldPaddingY;
252
236
  switch (this.valign) {
253
237
  case VAlign.MIDDLE:
254
238
  newY = Math.floor((this._height - (this.textHeight * this.field.scale.y)) * 0.5);
@@ -262,164 +246,128 @@ var FLabel = /** @class */ (function (_super) {
262
246
  this.fieldMask.y = this.fieldPaddingY;
263
247
  this.fieldMask.width = this._width - (this.fieldPaddingX * 2);
264
248
  this.fieldMask.height = this._height - (this.fieldPaddingY * 2);
265
- };
266
- Object.defineProperty(FLabel.prototype, "isBitmap", {
267
- get: function () {
268
- return this.config.isBitmap;
269
- },
270
- set: function (value) {
271
- if (value === this.config.isBitmap) {
272
- return;
273
- }
274
- this.config.isBitmap = value;
275
- this.createField();
276
- this.updateBg();
277
- this.commitData();
278
- },
279
- enumerable: false,
280
- configurable: true
281
- });
282
- Object.defineProperty(FLabel.prototype, "fontFamily", {
283
- get: function () {
284
- return this.config.fontFamily;
285
- },
286
- set: function (value) {
287
- if (value === this.config.fontFamily) {
288
- return;
289
- }
290
- this.config.fontFamily = value;
291
- this.applyStyle();
292
- },
293
- enumerable: false,
294
- configurable: true
295
- });
296
- Object.defineProperty(FLabel.prototype, "color", {
297
- get: function () {
298
- return this.config.color;
299
- },
300
- set: function (value) {
301
- if (value === this.config.color) {
302
- return;
303
- }
304
- this.config.color = value;
305
- this.applyStyle();
306
- },
307
- enumerable: false,
308
- configurable: true
309
- });
310
- Object.defineProperty(FLabel.prototype, "gradientColor", {
311
- get: function () {
312
- return this.config.gradientColor;
313
- },
314
- set: function (value) {
315
- this.config.gradientColor = value;
316
- this.applyStyle();
317
- },
318
- enumerable: false,
319
- configurable: true
320
- });
321
- Object.defineProperty(FLabel.prototype, "size", {
322
- get: function () {
323
- return this.config.size;
324
- },
325
- set: function (value) {
326
- if (value === this.config.size) {
327
- return;
328
- }
329
- this.config.size = value;
330
- this.applyStyle();
331
- },
332
- enumerable: false,
333
- configurable: true
334
- });
335
- Object.defineProperty(FLabel.prototype, "align", {
336
- /*public get width(): number {
337
- return this._width;
338
- }
339
-
340
- public set width(value: number) {
341
- if (value === this._width) {
342
- return;
343
- }
344
-
345
- this._width = value;
346
-
347
- this.commitData();
348
- }*/
349
- /*public get height(): number {
350
- return this._height;
351
- }
352
-
353
- public set height(value: number) {
354
- if (value === this._height) {
355
- return;
356
- }
357
-
358
- this._height = value;
359
-
360
- this.commitData();
361
- }*/
362
- get: function () {
363
- return this.config.align;
364
- },
365
- set: function (value) {
366
- if (value === this.config.align) {
367
- return;
368
- }
369
- this.config.align = value;
370
- // this.arrange();
371
- this.applyStyle();
372
- },
373
- enumerable: false,
374
- configurable: true
375
- });
376
- Object.defineProperty(FLabel.prototype, "valign", {
377
- get: function () {
378
- return this.config.valign;
379
- },
380
- set: function (value) {
381
- if (value === this.config.valign) {
382
- return;
383
- }
384
- this.config.valign = value;
385
- this.arrange();
386
- },
387
- enumerable: false,
388
- configurable: true
389
- });
390
- Object.defineProperty(FLabel.prototype, "bgAlpha", {
391
- get: function () {
392
- return this.config.bgAlpha;
393
- },
394
- set: function (value) {
395
- if (value === this.config.bgAlpha) {
396
- return;
397
- }
398
- this.config.bgAlpha = value;
399
- this.updateBg();
400
- this.arrange();
401
- },
402
- enumerable: false,
403
- configurable: true
404
- });
405
- Object.defineProperty(FLabel.prototype, "bgColor", {
406
- get: function () {
407
- return this.config.bgColor;
408
- },
409
- set: function (value) {
410
- if (value === this.config.bgColor) {
411
- return;
412
- }
413
- this.config.bgColor = value;
414
- this.updateBg();
415
- this.arrange();
416
- },
417
- enumerable: false,
418
- configurable: true
419
- });
420
- FLabel.prototype.updateBg = function () {
421
- var bgColor = this.config.bgColor ? this.config.bgColor : 0;
422
- var bgAlpha = this.config.bgAlpha ? this.config.bgAlpha : 0;
249
+ }
250
+ get isBitmap() {
251
+ return this.config.isBitmap;
252
+ }
253
+ set isBitmap(value) {
254
+ if (value === this.config.isBitmap) {
255
+ return;
256
+ }
257
+ this.config.isBitmap = value;
258
+ this.createField();
259
+ this.updateBg();
260
+ this.commitData();
261
+ }
262
+ get fontFamily() {
263
+ return this.config.fontFamily;
264
+ }
265
+ set fontFamily(value) {
266
+ if (value === this.config.fontFamily) {
267
+ return;
268
+ }
269
+ this.config.fontFamily = value;
270
+ this.applyStyle();
271
+ }
272
+ get color() {
273
+ return this.config.color;
274
+ }
275
+ set color(value) {
276
+ if (value === this.config.color) {
277
+ return;
278
+ }
279
+ this.config.color = value;
280
+ this.applyStyle();
281
+ }
282
+ get gradientColor() {
283
+ return this.config.gradientColor;
284
+ }
285
+ set gradientColor(value) {
286
+ this.config.gradientColor = value;
287
+ this.applyStyle();
288
+ }
289
+ get size() {
290
+ return this.config.size;
291
+ }
292
+ set size(value) {
293
+ if (value === this.config.size) {
294
+ return;
295
+ }
296
+ this.config.size = value;
297
+ this.applyStyle();
298
+ }
299
+ /*public get width(): number {
300
+ return this._width;
301
+ }
302
+
303
+ public set width(value: number) {
304
+ if (value === this._width) {
305
+ return;
306
+ }
307
+
308
+ this._width = value;
309
+
310
+ this.commitData();
311
+ }*/
312
+ /*public get height(): number {
313
+ return this._height;
314
+ }
315
+
316
+ public set height(value: number) {
317
+ if (value === this._height) {
318
+ return;
319
+ }
320
+
321
+ this._height = value;
322
+
323
+ this.commitData();
324
+ }*/
325
+ get align() {
326
+ return this.config.align;
327
+ }
328
+ set align(value) {
329
+ if (value === this.config.align) {
330
+ return;
331
+ }
332
+ this.config.align = value;
333
+ // this.arrange();
334
+ this.applyStyle();
335
+ }
336
+ get valign() {
337
+ return this.config.valign;
338
+ }
339
+ set valign(value) {
340
+ if (value === this.config.valign) {
341
+ return;
342
+ }
343
+ this.config.valign = value;
344
+ this.arrange();
345
+ }
346
+ get bgAlpha() {
347
+ return this.config.bgAlpha;
348
+ }
349
+ set bgAlpha(value) {
350
+ if (value === this.config.bgAlpha) {
351
+ return;
352
+ }
353
+ this.config.bgAlpha = value;
354
+ this.updateBg();
355
+ this.arrange();
356
+ }
357
+ get bgColor() {
358
+ return this.config.bgColor;
359
+ }
360
+ set bgColor(value) {
361
+ if (value === this.config.bgColor) {
362
+ return;
363
+ }
364
+ this.config.bgColor = value;
365
+ this.updateBg();
366
+ this.arrange();
367
+ }
368
+ updateBg() {
369
+ const bgColor = this.config.bgColor ? this.config.bgColor : 0;
370
+ const bgAlpha = this.config.bgAlpha ? this.config.bgAlpha : 0;
423
371
  this.bg.clear();
424
372
  this.bg.beginFill(bgColor, 1);
425
373
  this.bg.drawRect(0, 0, 10, 10);
@@ -429,267 +377,185 @@ var FLabel = /** @class */ (function (_super) {
429
377
  this.fieldMask.beginFill(0x00FF00, 1);
430
378
  this.fieldMask.drawRect(0, 0, 10, 10);
431
379
  this.fieldMask.endFill();
432
- };
433
- Object.defineProperty(FLabel.prototype, "text", {
434
- get: function () {
435
- return this.field.text;
436
- },
437
- set: function (value) {
438
- if (value === this.field.text) {
439
- return;
440
- }
441
- this.field.text = value;
442
- this.dispatchEvent(new Event(FLabelEvent.TEXT_CHANGE));
443
- this.commitData();
444
- },
445
- enumerable: false,
446
- configurable: true
447
- });
448
- Object.defineProperty(FLabel.prototype, "autosize", {
449
- get: function () {
450
- return this.config.autosize;
451
- },
452
- set: function (value) {
453
- if (value === this.config.autosize) {
454
- return;
455
- }
456
- this.config.autosize = value;
457
- this.arrange();
458
- },
459
- enumerable: false,
460
- configurable: true
461
- });
462
- Object.defineProperty(FLabel.prototype, "autosizeType", {
463
- get: function () {
464
- return this.config.autosizeType;
465
- },
466
- set: function (value) {
467
- if (value === this.config.autosizeType) {
468
- return;
469
- }
470
- this.config.autosizeType = value;
471
- this.arrange();
472
- },
473
- enumerable: false,
474
- configurable: true
475
- });
476
- Object.defineProperty(FLabel.prototype, "maxAutosizeWidth", {
477
- get: function () {
478
- return this.config.maxAutosizeWidth || 0;
479
- },
480
- set: function (value) {
481
- if (value === this.config.maxAutosizeWidth) {
482
- return;
483
- }
484
- this.config.maxAutosizeWidth = value;
485
- this.arrange();
486
- },
487
- enumerable: false,
488
- configurable: true
489
- });
490
- Object.defineProperty(FLabel.prototype, "maxAutosizeHeight", {
491
- get: function () {
492
- return this.config.maxAutosizeHeight || 0;
493
- },
494
- set: function (value) {
495
- if (value === this.config.maxAutosizeHeight) {
496
- return;
497
- }
498
- this.config.maxAutosizeHeight = value;
499
- this.arrange();
500
- },
501
- enumerable: false,
502
- configurable: true
503
- });
504
- Object.defineProperty(FLabel.prototype, "fitToSize", {
505
- get: function () {
506
- return this.config.fitToSize;
507
- },
508
- set: function (value) {
509
- if (value === this.config.fitToSize) {
510
- return;
511
- }
512
- this.config.fitToSize = value;
513
- this.arrange();
514
- },
515
- enumerable: false,
516
- configurable: true
517
- });
518
- Object.defineProperty(FLabel.prototype, "changeFontSizeToFit", {
519
- get: function () {
520
- return this.config.changeFontSizeToFit;
521
- },
522
- set: function (value) {
523
- if (value === this.config.changeFontSizeToFit) {
524
- return;
525
- }
526
- this.config.changeFontSizeToFit = value;
527
- this.arrange();
528
- },
529
- enumerable: false,
530
- configurable: true
531
- });
532
- Object.defineProperty(FLabel.prototype, "textWidth", {
533
- get: function () {
534
- if (this.isBitmap) {
535
- // return (this.field as BitmapText).textWidth;
536
- return this.fieldLocalBounds.x + this.fieldLocalBounds.width;
537
- }
538
- else {
539
- return this.field.width / this.field.scale.x;
540
- }
541
- },
542
- enumerable: false,
543
- configurable: true
544
- });
545
- Object.defineProperty(FLabel.prototype, "textHeight", {
546
- get: function () {
547
- if (this.isBitmap) {
548
- // return (this.field as BitmapText).textHeight;
549
- return this.fieldLocalBounds.y + this.fieldLocalBounds.height;
550
- }
551
- else {
552
- return this.field.height / this.field.scale.y;
553
- }
554
- },
555
- enumerable: false,
556
- configurable: true
557
- });
558
- Object.defineProperty(FLabel.prototype, "textAvailableWidth", {
559
- get: function () {
560
- return this.width - (this.fieldPaddingX * 2);
561
- },
562
- enumerable: false,
563
- configurable: true
564
- });
565
- Object.defineProperty(FLabel.prototype, "textAvailableHeight", {
566
- get: function () {
567
- return this.height - (this.fieldPaddingY * 2);
568
- },
569
- enumerable: false,
570
- configurable: true
571
- });
572
- Object.defineProperty(FLabel.prototype, "bold", {
573
- get: function () {
574
- return this.config.bold;
575
- },
576
- set: function (value) {
577
- if (this.config.bold === value) {
578
- return;
579
- }
580
- this.config.bold = value;
581
- this.applyStyle();
582
- },
583
- enumerable: false,
584
- configurable: true
585
- });
586
- Object.defineProperty(FLabel.prototype, "dropShadow", {
587
- get: function () {
588
- return this.config.dropShadow;
589
- },
590
- set: function (value) {
591
- if (this.config.dropShadow === value) {
592
- return;
593
- }
594
- this.config.dropShadow = value;
595
- this.applyStyle();
596
- },
597
- enumerable: false,
598
- configurable: true
599
- });
600
- Object.defineProperty(FLabel.prototype, "stroke", {
601
- get: function () {
602
- return this.config.stroke;
603
- },
604
- set: function (value) {
605
- if (this.config.stroke === value) {
606
- return;
607
- }
608
- this.config.stroke = value;
609
- this.applyStyle();
610
- },
611
- enumerable: false,
612
- configurable: true
613
- });
614
- Object.defineProperty(FLabel.prototype, "strokeThickness", {
615
- get: function () {
616
- return this.config.strokeThickness;
617
- },
618
- set: function (value) {
619
- if (this.config.strokeThickness === value) {
620
- return;
621
- }
622
- this.config.strokeThickness = value;
623
- this.applyStyle();
624
- },
625
- enumerable: false,
626
- configurable: true
627
- });
628
- Object.defineProperty(FLabel.prototype, "fieldPaddingX", {
629
- get: function () {
630
- return this.config.fieldPaddingX || 0;
631
- },
632
- set: function (value) {
633
- if (this.config.fieldPaddingX === value) {
634
- return;
635
- }
636
- this.config.fieldPaddingX = value;
637
- this.arrange();
638
- },
639
- enumerable: false,
640
- configurable: true
641
- });
642
- Object.defineProperty(FLabel.prototype, "fieldPaddingY", {
643
- get: function () {
644
- return this.config.fieldPaddingY || 0;
645
- },
646
- set: function (value) {
647
- if (this.config.fieldPaddingY === value) {
648
- return;
649
- }
650
- this.config.fieldPaddingY = value;
651
- this.arrange();
652
- },
653
- enumerable: false,
654
- configurable: true
655
- });
656
- Object.defineProperty(FLabel.prototype, "wordWrap", {
657
- get: function () {
658
- return this.config.wordWrap;
659
- },
660
- set: function (value) {
661
- if (this.config.wordWrap === value) {
662
- return;
663
- }
664
- this.config.wordWrap = value;
665
- this.applyStyle();
666
- },
667
- enumerable: false,
668
- configurable: true
669
- });
670
- Object.defineProperty(FLabel.prototype, "wordWrapWidth", {
671
- get: function () {
672
- return this.config.wordWrapWidth;
673
- },
674
- set: function (value) {
675
- if (this.config.wordWrapWidth === value) {
676
- return;
677
- }
678
- this.config.wordWrapWidth = value;
679
- this.applyStyle();
680
- },
681
- enumerable: false,
682
- configurable: true
683
- });
684
- Object.defineProperty(FLabel.prototype, "engineField", {
685
- get: function () {
686
- return this.field;
687
- },
688
- enumerable: false,
689
- configurable: true
690
- });
691
- FLabel.DEFAULT_CONFIG = new FLabelDefaultConfig();
692
- return FLabel;
693
- }(FContainer));
694
- export { FLabel };
380
+ }
381
+ get text() {
382
+ return this.field.text;
383
+ }
384
+ set text(value) {
385
+ if (value === this.field.text) {
386
+ return;
387
+ }
388
+ this.field.text = value;
389
+ this.dispatchEvent(new Event(FLabelEvent.TEXT_CHANGE));
390
+ this.commitData();
391
+ }
392
+ get autosize() {
393
+ return this.config.autosize;
394
+ }
395
+ set autosize(value) {
396
+ if (value === this.config.autosize) {
397
+ return;
398
+ }
399
+ this.config.autosize = value;
400
+ this.arrange();
401
+ }
402
+ get autosizeType() {
403
+ return this.config.autosizeType;
404
+ }
405
+ set autosizeType(value) {
406
+ if (value === this.config.autosizeType) {
407
+ return;
408
+ }
409
+ this.config.autosizeType = value;
410
+ this.arrange();
411
+ }
412
+ get maxAutosizeWidth() {
413
+ return this.config.maxAutosizeWidth || 0;
414
+ }
415
+ set maxAutosizeWidth(value) {
416
+ if (value === this.config.maxAutosizeWidth) {
417
+ return;
418
+ }
419
+ this.config.maxAutosizeWidth = value;
420
+ this.arrange();
421
+ }
422
+ get maxAutosizeHeight() {
423
+ return this.config.maxAutosizeHeight || 0;
424
+ }
425
+ set maxAutosizeHeight(value) {
426
+ if (value === this.config.maxAutosizeHeight) {
427
+ return;
428
+ }
429
+ this.config.maxAutosizeHeight = value;
430
+ this.arrange();
431
+ }
432
+ get fitToSize() {
433
+ return this.config.fitToSize;
434
+ }
435
+ set fitToSize(value) {
436
+ if (value === this.config.fitToSize) {
437
+ return;
438
+ }
439
+ this.config.fitToSize = value;
440
+ this.arrange();
441
+ }
442
+ get changeFontSizeToFit() {
443
+ return this.config.changeFontSizeToFit;
444
+ }
445
+ set changeFontSizeToFit(value) {
446
+ if (value === this.config.changeFontSizeToFit) {
447
+ return;
448
+ }
449
+ this.config.changeFontSizeToFit = value;
450
+ this.arrange();
451
+ }
452
+ get textWidth() {
453
+ if (this.isBitmap) {
454
+ // return (this.field as BitmapText).textWidth;
455
+ return this.fieldLocalBounds.x + this.fieldLocalBounds.width;
456
+ }
457
+ else {
458
+ return this.field.width / this.field.scale.x;
459
+ }
460
+ }
461
+ get textHeight() {
462
+ if (this.isBitmap) {
463
+ // return (this.field as BitmapText).textHeight;
464
+ return this.fieldLocalBounds.y + this.fieldLocalBounds.height;
465
+ }
466
+ else {
467
+ return this.field.height / this.field.scale.y;
468
+ }
469
+ }
470
+ get textAvailableWidth() {
471
+ return this.width - (this.fieldPaddingX * 2);
472
+ }
473
+ get textAvailableHeight() {
474
+ return this.height - (this.fieldPaddingY * 2);
475
+ }
476
+ get bold() {
477
+ return this.config.bold;
478
+ }
479
+ set bold(value) {
480
+ if (this.config.bold === value) {
481
+ return;
482
+ }
483
+ this.config.bold = value;
484
+ this.applyStyle();
485
+ }
486
+ get dropShadow() {
487
+ return this.config.dropShadow;
488
+ }
489
+ set dropShadow(value) {
490
+ if (this.config.dropShadow === value) {
491
+ return;
492
+ }
493
+ this.config.dropShadow = value;
494
+ this.applyStyle();
495
+ }
496
+ get stroke() {
497
+ return this.config.stroke;
498
+ }
499
+ set stroke(value) {
500
+ if (this.config.stroke === value) {
501
+ return;
502
+ }
503
+ this.config.stroke = value;
504
+ this.applyStyle();
505
+ }
506
+ get strokeThickness() {
507
+ return this.config.strokeThickness;
508
+ }
509
+ set strokeThickness(value) {
510
+ if (this.config.strokeThickness === value) {
511
+ return;
512
+ }
513
+ this.config.strokeThickness = value;
514
+ this.applyStyle();
515
+ }
516
+ get fieldPaddingX() {
517
+ return this.config.fieldPaddingX || 0;
518
+ }
519
+ set fieldPaddingX(value) {
520
+ if (this.config.fieldPaddingX === value) {
521
+ return;
522
+ }
523
+ this.config.fieldPaddingX = value;
524
+ this.arrange();
525
+ }
526
+ get fieldPaddingY() {
527
+ return this.config.fieldPaddingY || 0;
528
+ }
529
+ set fieldPaddingY(value) {
530
+ if (this.config.fieldPaddingY === value) {
531
+ return;
532
+ }
533
+ this.config.fieldPaddingY = value;
534
+ this.arrange();
535
+ }
536
+ get wordWrap() {
537
+ return this.config.wordWrap;
538
+ }
539
+ set wordWrap(value) {
540
+ if (this.config.wordWrap === value) {
541
+ return;
542
+ }
543
+ this.config.wordWrap = value;
544
+ this.applyStyle();
545
+ }
546
+ get wordWrapWidth() {
547
+ return this.config.wordWrapWidth;
548
+ }
549
+ set wordWrapWidth(value) {
550
+ if (this.config.wordWrapWidth === value) {
551
+ return;
552
+ }
553
+ this.config.wordWrapWidth = value;
554
+ this.applyStyle();
555
+ }
556
+ get engineField() {
557
+ return this.field;
558
+ }
559
+ }
560
+ FLabel.DEFAULT_CONFIG = new FLabelDefaultConfig();
695
561
  //# sourceMappingURL=FLabel.js.map