@babylonjs/gui 9.15.0 → 9.16.1

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 (64) hide show
  1. package/2D/controls/checkbox.pure.js +164 -153
  2. package/2D/controls/checkbox.pure.js.map +1 -1
  3. package/2D/controls/colorpicker.pure.js +1300 -1289
  4. package/2D/controls/colorpicker.pure.js.map +1 -1
  5. package/2D/controls/container.pure.js +597 -582
  6. package/2D/controls/container.pure.js.map +1 -1
  7. package/2D/controls/control.pure.js +2474 -2434
  8. package/2D/controls/control.pure.js.map +1 -1
  9. package/2D/controls/displayGrid.pure.js +201 -190
  10. package/2D/controls/displayGrid.pure.js.map +1 -1
  11. package/2D/controls/ellipse.pure.js +96 -85
  12. package/2D/controls/ellipse.pure.js.map +1 -1
  13. package/2D/controls/grid.pure.js +511 -500
  14. package/2D/controls/grid.pure.js.map +1 -1
  15. package/2D/controls/image.pure.js +888 -877
  16. package/2D/controls/image.pure.js.map +1 -1
  17. package/2D/controls/inputText.pure.js +988 -973
  18. package/2D/controls/inputText.pure.js.map +1 -1
  19. package/2D/controls/inputTextArea.pure.js +955 -944
  20. package/2D/controls/inputTextArea.pure.js.map +1 -1
  21. package/2D/controls/line.pure.js +237 -226
  22. package/2D/controls/line.pure.js.map +1 -1
  23. package/2D/controls/multiLine.pure.js +233 -222
  24. package/2D/controls/multiLine.pure.js.map +1 -1
  25. package/2D/controls/radioButton.pure.js +182 -169
  26. package/2D/controls/radioButton.pure.js.map +1 -1
  27. package/2D/controls/rectangle.pure.js +211 -200
  28. package/2D/controls/rectangle.pure.js.map +1 -1
  29. package/2D/controls/scrollViewers/scrollViewer.pure.js +579 -567
  30. package/2D/controls/scrollViewers/scrollViewer.pure.js.map +1 -1
  31. package/2D/controls/sliders/baseSlider.js +291 -280
  32. package/2D/controls/sliders/baseSlider.js.map +1 -1
  33. package/2D/controls/sliders/imageBasedSlider.pure.js +158 -147
  34. package/2D/controls/sliders/imageBasedSlider.pure.js.map +1 -1
  35. package/2D/controls/sliders/imageScrollBar.js +237 -223
  36. package/2D/controls/sliders/imageScrollBar.js.map +1 -1
  37. package/2D/controls/sliders/scrollBar.pure.js +169 -158
  38. package/2D/controls/sliders/scrollBar.pure.js.map +1 -1
  39. package/2D/controls/sliders/slider.pure.js +251 -240
  40. package/2D/controls/sliders/slider.pure.js.map +1 -1
  41. package/2D/controls/stackPanel.pure.js +236 -221
  42. package/2D/controls/stackPanel.pure.js.map +1 -1
  43. package/2D/controls/textBlock.pure.js +637 -626
  44. package/2D/controls/textBlock.pure.js.map +1 -1
  45. package/3D/materials/fluent/fluentMaterial.pure.d.ts +4 -4
  46. package/3D/materials/fluent/fluentMaterial.pure.js +322 -273
  47. package/3D/materials/fluent/fluentMaterial.pure.js.map +1 -1
  48. package/3D/materials/fluentBackplate/fluentBackplateMaterial.pure.js +510 -454
  49. package/3D/materials/fluentBackplate/fluentBackplateMaterial.pure.js.map +1 -1
  50. package/3D/materials/fluentButton/fluentButtonMaterial.pure.js +612 -529
  51. package/3D/materials/fluentButton/fluentButtonMaterial.pure.js.map +1 -1
  52. package/3D/materials/mrdl/mrdlBackglowMaterial.pure.js +313 -274
  53. package/3D/materials/mrdl/mrdlBackglowMaterial.pure.js.map +1 -1
  54. package/3D/materials/mrdl/mrdlBackplateMaterial.pure.js +462 -405
  55. package/3D/materials/mrdl/mrdlBackplateMaterial.pure.js.map +1 -1
  56. package/3D/materials/mrdl/mrdlFrontplateMaterial.pure.js +583 -501
  57. package/3D/materials/mrdl/mrdlFrontplateMaterial.pure.js.map +1 -1
  58. package/3D/materials/mrdl/mrdlInnerquadMaterial.pure.js +226 -203
  59. package/3D/materials/mrdl/mrdlInnerquadMaterial.pure.js.map +1 -1
  60. package/3D/materials/mrdl/mrdlSliderBarMaterial.pure.js +961 -825
  61. package/3D/materials/mrdl/mrdlSliderBarMaterial.pure.js.map +1 -1
  62. package/3D/materials/mrdl/mrdlSliderThumbMaterial.pure.js +961 -825
  63. package/3D/materials/mrdl/mrdlSliderThumbMaterial.pure.js.map +1 -1
  64. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { __decorate } from "@babylonjs/core/tslib.es6.js";
1
+ import { __esDecorate, __runInitializers } from "@babylonjs/core/tslib.es6.js";
2
2
  import { Rectangle } from "../rectangle.pure.js";
3
3
  import { Grid } from "../grid.pure.js";
4
4
  import { Control } from "../control.pure.js";
@@ -10,579 +10,591 @@ import { serialize } from "@babylonjs/core/Misc/decorators.js";
10
10
  /**
11
11
  * Class used to hold a viewer window and sliders in a grid
12
12
  */
13
- export class ScrollViewer extends Rectangle {
14
- /**
15
- * Gets the horizontal scrollbar
16
- */
17
- get horizontalBar() {
18
- return this._horizontalBar;
19
- }
20
- /**
21
- * Gets the vertical scrollbar
22
- */
23
- get verticalBar() {
24
- return this._verticalBar;
25
- }
26
- /**
27
- * Adds a new control to the current container
28
- * @param control defines the control to add
29
- * @returns the current container
30
- */
31
- addControl(control) {
32
- if (!control) {
33
- return this;
34
- }
35
- this._window.addControl(control);
36
- return this;
37
- }
38
- /**
39
- * Removes a control from the current container
40
- * @param control defines the control to remove
41
- * @returns the current container
42
- */
43
- removeControl(control) {
44
- this._window.removeControl(control);
45
- return this;
46
- }
47
- /** Gets the list of children */
48
- get children() {
49
- return this._window.children;
50
- }
51
- _flagDescendantsAsMatrixDirty() {
52
- for (const child of this._children) {
53
- child._markMatrixAsDirty();
54
- }
55
- }
56
- /**
57
- * Freezes or unfreezes the controls in the window.
58
- * When controls are frozen, the scroll viewer can render a lot more quickly but updates to positions/sizes of controls
59
- * are not taken into account. If you want to change positions/sizes, unfreeze, perform the changes then freeze again
60
- */
61
- get freezeControls() {
62
- return this._window.freezeControls;
63
- }
64
- set freezeControls(value) {
65
- this._window.freezeControls = value;
66
- }
67
- /** Gets the bucket width */
68
- get bucketWidth() {
69
- return this._window.bucketWidth;
70
- }
71
- /** Gets the bucket height */
72
- get bucketHeight() {
73
- return this._window.bucketHeight;
74
- }
75
- /**
76
- * Sets the bucket sizes.
77
- * When freezeControls is true, setting a non-zero bucket size will improve performances by updating only
78
- * controls that are visible. The bucket sizes is used to subdivide (internally) the window area to smaller areas into which
79
- * controls are dispatched. So, the size should be roughly equals to the mean size of all the controls of
80
- * the window. To disable the usage of buckets, sets either width or height (or both) to 0.
81
- * Please note that using this option will raise the memory usage (the higher the bucket sizes, the less memory
82
- * used), that's why it is not enabled by default.
83
- * @param width width of the bucket
84
- * @param height height of the bucket
85
- */
86
- setBucketSizes(width, height) {
87
- this._window.setBucketSizes(width, height);
88
- }
89
- /**
90
- * Forces the horizontal scroll bar to be displayed
91
- */
92
- get forceHorizontalBar() {
93
- return this._forceHorizontalBar;
94
- }
95
- set forceHorizontalBar(value) {
96
- this._grid.setRowDefinition(1, value ? this._barSize : 0, true);
97
- this._horizontalBar.isVisible = value;
98
- this._forceHorizontalBar = value;
99
- }
100
- /**
101
- * Forces the vertical scroll bar to be displayed
102
- */
103
- get forceVerticalBar() {
104
- return this._forceVerticalBar;
105
- }
106
- set forceVerticalBar(value) {
107
- this._grid.setColumnDefinition(1, value ? this._barSize : 0, true);
108
- this._verticalBar.isVisible = value;
109
- this._forceVerticalBar = value;
110
- }
111
- /**
112
- * Creates a new ScrollViewer
113
- * @param name of ScrollViewer
114
- * @param isImageBased
115
- */
116
- constructor(name, isImageBased) {
117
- super(name);
118
- this._barSize = 20;
119
- this._pointerIsOver = false;
120
- this._wheelPrecision = 0.05;
121
- this._thumbLength = 0.5;
122
- this._thumbHeight = 1;
123
- this._barImageHeight = 1;
124
- this._horizontalBarImageHeight = 1;
125
- this._verticalBarImageHeight = 1;
126
- this._oldWindowContentsWidth = 0;
127
- this._oldWindowContentsHeight = 0;
128
- this._forceHorizontalBar = false;
129
- this._forceVerticalBar = false;
130
- this._useImageBar = isImageBased ? isImageBased : false;
131
- this.onDirtyObservable.add(() => {
132
- this._horizontalBarSpace.color = this.color;
133
- this._verticalBarSpace.color = this.color;
134
- this._dragSpace.color = this.color;
135
- });
136
- this.onPointerEnterObservable.add(() => {
137
- this._pointerIsOver = true;
138
- });
139
- this.onPointerOutObservable.add(() => {
140
- this._pointerIsOver = false;
141
- });
142
- this._grid = new Grid();
143
- if (this._useImageBar) {
144
- this._horizontalBar = new ImageScrollBar();
145
- this._verticalBar = new ImageScrollBar();
146
- }
147
- else {
148
- this._horizontalBar = new ScrollBar();
149
- this._verticalBar = new ScrollBar();
150
- }
151
- this._window = new _ScrollViewerWindow("scrollViewer_window");
152
- this._window.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;
153
- this._window.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;
154
- this._grid.addColumnDefinition(1);
155
- this._grid.addColumnDefinition(0, true);
156
- this._grid.addRowDefinition(1);
157
- this._grid.addRowDefinition(0, true);
158
- super.addControl(this._grid);
159
- this._grid.addControl(this._window, 0, 0);
160
- this._verticalBarSpace = new Rectangle();
161
- this._verticalBarSpace.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;
162
- this._verticalBarSpace.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;
163
- this._verticalBarSpace.thickness = 1;
164
- this._grid.addControl(this._verticalBarSpace, 0, 1);
165
- this._addBar(this._verticalBar, this._verticalBarSpace, true, Math.PI);
166
- this._horizontalBarSpace = new Rectangle();
167
- this._horizontalBarSpace.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;
168
- this._horizontalBarSpace.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;
169
- this._horizontalBarSpace.thickness = 1;
170
- this._grid.addControl(this._horizontalBarSpace, 1, 0);
171
- this._addBar(this._horizontalBar, this._horizontalBarSpace, false, 0);
172
- this._dragSpace = new Rectangle();
173
- this._dragSpace.thickness = 1;
174
- this._grid.addControl(this._dragSpace, 1, 1);
175
- this._grid.clipChildren = false;
176
- // Colors
177
- if (!this._useImageBar) {
178
- this.barColor = "grey";
179
- this.barBackground = "transparent";
180
- }
181
- }
182
- /** Reset the scroll viewer window to initial size */
183
- resetWindow() {
184
- this._window.width = "100%";
185
- this._window.height = "100%";
186
- }
187
- _getTypeName() {
188
- return "ScrollViewer";
189
- }
190
- _buildClientSizes() {
191
- const ratio = this.host.idealRatio;
192
- this._window.parentClientWidth = this._currentMeasure.width - (this._verticalBar.isVisible || this.forceVerticalBar ? this._barSize * ratio : 0) - 2 * this.thickness;
193
- this._window.parentClientHeight = this._currentMeasure.height - (this._horizontalBar.isVisible || this.forceHorizontalBar ? this._barSize * ratio : 0) - 2 * this.thickness;
194
- this._clientWidth = this._window.parentClientWidth;
195
- this._clientHeight = this._window.parentClientHeight;
196
- }
197
- _additionalProcessing(parentMeasure, context) {
198
- super._additionalProcessing(parentMeasure, context);
199
- this._buildClientSizes();
200
- }
201
- _postMeasure() {
202
- super._postMeasure();
203
- this._updateScroller();
204
- this._setWindowPosition(false);
205
- }
206
- /**
207
- * Gets or sets the mouse wheel precision
208
- * from 0 to 1 with a default value of 0.05
209
- * */
210
- get wheelPrecision() {
211
- return this._wheelPrecision;
212
- }
213
- set wheelPrecision(value) {
214
- if (this._wheelPrecision === value) {
215
- return;
216
- }
217
- if (value < 0) {
218
- value = 0;
219
- }
220
- if (value > 1) {
221
- value = 1;
222
- }
223
- this._wheelPrecision = value;
224
- }
225
- /** Gets or sets the scroll bar container background color */
226
- get scrollBackground() {
227
- return this._horizontalBarSpace.background;
228
- }
229
- set scrollBackground(color) {
230
- if (this._horizontalBarSpace.background === color) {
231
- return;
232
- }
233
- this._horizontalBarSpace.background = color;
234
- this._verticalBarSpace.background = color;
235
- }
236
- /** Gets or sets the bar color */
237
- get barColor() {
238
- return this._barColor;
239
- }
240
- set barColor(color) {
241
- if (this._barColor === color) {
242
- return;
243
- }
244
- this._barColor = color;
245
- this._horizontalBar.color = color;
246
- this._verticalBar.color = color;
247
- }
248
- /** Gets or sets the bar image */
249
- get thumbImage() {
250
- return this._barImage;
251
- }
252
- set thumbImage(value) {
253
- if (this._barImage === value) {
254
- return;
255
- }
256
- this._barImage = value;
257
- const hb = this._horizontalBar;
258
- const vb = this._verticalBar;
259
- hb.thumbImage = value;
260
- vb.thumbImage = value;
261
- }
262
- /** Gets or sets the horizontal bar image */
263
- get horizontalThumbImage() {
264
- return this._horizontalBarImage;
265
- }
266
- set horizontalThumbImage(value) {
267
- if (this._horizontalBarImage === value) {
268
- return;
269
- }
270
- this._horizontalBarImage = value;
271
- const hb = this._horizontalBar;
272
- hb.thumbImage = value;
273
- }
274
- /** Gets or sets the vertical bar image */
275
- get verticalThumbImage() {
276
- return this._verticalBarImage;
277
- }
278
- set verticalThumbImage(value) {
279
- if (this._verticalBarImage === value) {
280
- return;
281
- }
282
- this._verticalBarImage = value;
283
- const vb = this._verticalBar;
284
- vb.thumbImage = value;
285
- }
286
- /** Gets or sets the size of the bar */
287
- get barSize() {
288
- return this._barSize;
289
- }
290
- set barSize(value) {
291
- if (this._barSize === value) {
292
- return;
293
- }
294
- this._barSize = value;
295
- this._markAsDirty();
296
- if (this._horizontalBar.isVisible) {
297
- this._grid.setRowDefinition(1, this._barSize, true);
298
- }
299
- if (this._verticalBar.isVisible) {
300
- this._grid.setColumnDefinition(1, this._barSize, true);
301
- }
302
- }
303
- /** Gets or sets the length of the thumb */
304
- get thumbLength() {
305
- return this._thumbLength;
306
- }
307
- set thumbLength(value) {
308
- if (this._thumbLength === value) {
309
- return;
310
- }
311
- if (value <= 0) {
312
- value = 0.1;
313
- }
314
- if (value > 1) {
315
- value = 1;
316
- }
317
- this._thumbLength = value;
318
- const hb = this._horizontalBar;
319
- const vb = this._verticalBar;
320
- hb.thumbLength = value;
321
- vb.thumbLength = value;
322
- this._markAsDirty();
323
- }
324
- /** Gets or sets the height of the thumb */
325
- get thumbHeight() {
326
- return this._thumbHeight;
327
- }
328
- set thumbHeight(value) {
329
- if (this._thumbHeight === value) {
330
- return;
331
- }
332
- if (value <= 0) {
333
- value = 0.1;
334
- }
335
- if (value > 1) {
336
- value = 1;
337
- }
338
- this._thumbHeight = value;
339
- const hb = this._horizontalBar;
340
- const vb = this._verticalBar;
341
- hb.thumbHeight = value;
342
- vb.thumbHeight = value;
343
- this._markAsDirty();
344
- }
345
- /** Gets or sets the height of the bar image */
346
- get barImageHeight() {
347
- return this._barImageHeight;
348
- }
349
- set barImageHeight(value) {
350
- if (this._barImageHeight === value) {
351
- return;
352
- }
353
- if (value <= 0) {
354
- value = 0.1;
355
- }
356
- if (value > 1) {
357
- value = 1;
358
- }
359
- this._barImageHeight = value;
360
- const hb = this._horizontalBar;
361
- const vb = this._verticalBar;
362
- hb.barImageHeight = value;
363
- vb.barImageHeight = value;
364
- this._markAsDirty();
365
- }
366
- /** Gets or sets the height of the horizontal bar image */
367
- get horizontalBarImageHeight() {
368
- return this._horizontalBarImageHeight;
369
- }
370
- set horizontalBarImageHeight(value) {
371
- if (this._horizontalBarImageHeight === value) {
372
- return;
373
- }
374
- if (value <= 0) {
375
- value = 0.1;
376
- }
377
- if (value > 1) {
378
- value = 1;
379
- }
380
- this._horizontalBarImageHeight = value;
381
- const hb = this._horizontalBar;
382
- hb.barImageHeight = value;
383
- this._markAsDirty();
384
- }
385
- /** Gets or sets the height of the vertical bar image */
386
- get verticalBarImageHeight() {
387
- return this._verticalBarImageHeight;
388
- }
389
- set verticalBarImageHeight(value) {
390
- if (this._verticalBarImageHeight === value) {
391
- return;
392
- }
393
- if (value <= 0) {
394
- value = 0.1;
395
- }
396
- if (value > 1) {
397
- value = 1;
398
- }
399
- this._verticalBarImageHeight = value;
400
- const vb = this._verticalBar;
401
- vb.barImageHeight = value;
402
- this._markAsDirty();
403
- }
404
- /** Gets or sets the bar background */
405
- get barBackground() {
406
- return this._barBackground;
407
- }
408
- set barBackground(color) {
409
- if (this._barBackground === color) {
410
- return;
411
- }
412
- this._barBackground = color;
413
- const hb = this._horizontalBar;
414
- const vb = this._verticalBar;
415
- hb.background = color;
416
- vb.background = color;
417
- this._dragSpace.background = color;
418
- }
419
- /** Gets or sets the bar background image */
420
- get barImage() {
421
- return this._barBackgroundImage;
422
- }
423
- set barImage(value) {
424
- this._barBackgroundImage = value;
425
- const hb = this._horizontalBar;
426
- const vb = this._verticalBar;
427
- hb.backgroundImage = value;
428
- vb.backgroundImage = value;
429
- }
430
- /** Gets or sets the horizontal bar background image */
431
- get horizontalBarImage() {
432
- return this._horizontalBarBackgroundImage;
433
- }
434
- set horizontalBarImage(value) {
435
- this._horizontalBarBackgroundImage = value;
436
- const hb = this._horizontalBar;
437
- hb.backgroundImage = value;
438
- }
439
- /** Gets or sets the vertical bar background image */
440
- get verticalBarImage() {
441
- return this._verticalBarBackgroundImage;
442
- }
443
- set verticalBarImage(value) {
444
- this._verticalBarBackgroundImage = value;
445
- const vb = this._verticalBar;
446
- vb.backgroundImage = value;
447
- }
448
- _setWindowPosition(force = true) {
449
- const ratio = this.host.idealRatio;
450
- const windowContentsWidth = this._window._currentMeasure.width;
451
- const windowContentsHeight = this._window._currentMeasure.height;
452
- if (!force && this._oldWindowContentsWidth === windowContentsWidth && this._oldWindowContentsHeight === windowContentsHeight) {
453
- return;
454
- }
455
- this._oldWindowContentsWidth = windowContentsWidth;
456
- this._oldWindowContentsHeight = windowContentsHeight;
457
- const _endLeft = this._clientWidth - windowContentsWidth;
458
- const _endTop = this._clientHeight - windowContentsHeight;
459
- const newLeft = (this._horizontalBar.value / ratio) * _endLeft + "px";
460
- const newTop = (this._verticalBar.value / ratio) * _endTop + "px";
461
- if (newLeft !== this._window.left) {
462
- this._window.left = newLeft;
463
- if (!this.freezeControls) {
464
- this._rebuildLayout = true;
465
- }
466
- }
467
- if (newTop !== this._window.top) {
468
- this._window.top = newTop;
469
- if (!this.freezeControls) {
470
- this._rebuildLayout = true;
471
- }
472
- }
473
- }
474
- /** @internal */
475
- _updateScroller() {
476
- const windowContentsWidth = this._window._currentMeasure.width;
477
- const windowContentsHeight = this._window._currentMeasure.height;
478
- if (this._horizontalBar.isVisible && windowContentsWidth <= this._clientWidth && !this.forceHorizontalBar) {
479
- this._grid.setRowDefinition(1, 0, true);
480
- this._horizontalBar.isVisible = false;
481
- this._horizontalBar.value = 0;
482
- this._rebuildLayout = true;
483
- }
484
- else if (!this._horizontalBar.isVisible && (windowContentsWidth > this._clientWidth || this.forceHorizontalBar)) {
485
- this._grid.setRowDefinition(1, this._barSize, true);
486
- this._horizontalBar.isVisible = true;
487
- this._rebuildLayout = true;
488
- }
489
- if (this._verticalBar.isVisible && windowContentsHeight <= this._clientHeight && !this.forceVerticalBar) {
490
- this._grid.setColumnDefinition(1, 0, true);
491
- this._verticalBar.isVisible = false;
492
- this._verticalBar.value = 0;
493
- this._rebuildLayout = true;
494
- }
495
- else if (!this._verticalBar.isVisible && (windowContentsHeight > this._clientHeight || this.forceVerticalBar)) {
496
- this._grid.setColumnDefinition(1, this._barSize, true);
497
- this._verticalBar.isVisible = true;
498
- this._rebuildLayout = true;
499
- }
500
- this._buildClientSizes();
501
- const ratio = this.host.idealRatio;
502
- this._horizontalBar.thumbWidth = this._thumbLength * 0.9 * (this._clientWidth / ratio) + "px";
503
- this._verticalBar.thumbWidth = this._thumbLength * 0.9 * (this._clientHeight / ratio) + "px";
504
- }
505
- _link(host) {
506
- super._link(host);
507
- this._attachWheel();
508
- }
509
- /**
510
- * @internal
511
- */
512
- _addBar(barControl, barContainer, isVertical, rotation) {
513
- barControl.paddingLeft = 0;
514
- barControl.width = "100%";
515
- barControl.height = "100%";
516
- barControl.barOffset = 0;
517
- barControl.value = 0;
518
- barControl.maximum = 1;
519
- barControl.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;
520
- barControl.verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;
521
- barControl.isVertical = isVertical;
522
- barControl.rotation = rotation;
523
- barControl.isVisible = false;
524
- barContainer.addControl(barControl);
525
- barControl.onValueChangedObservable.add(() => {
526
- this._setWindowPosition();
527
- });
528
- }
529
- /** @internal */
530
- _attachWheel() {
531
- if (!this._host || this._onWheelObserver) {
532
- return;
533
- }
534
- this._onWheelObserver = this.onWheelObservable.add((pi) => {
535
- if (!this._pointerIsOver || this.isReadOnly) {
536
- return;
13
+ let ScrollViewer = (() => {
14
+ var _a;
15
+ let _classSuper = Rectangle;
16
+ let _instanceExtraInitializers = [];
17
+ let _get_wheelPrecision_decorators;
18
+ let _get_scrollBackground_decorators;
19
+ let _get_barColor_decorators;
20
+ let _get_barSize_decorators;
21
+ let _get_barBackground_decorators;
22
+ return _a = class ScrollViewer extends _classSuper {
23
+ /**
24
+ * Gets the horizontal scrollbar
25
+ */
26
+ get horizontalBar() {
27
+ return this._horizontalBar;
537
28
  }
538
- if (this._verticalBar.isVisible == true) {
539
- if (pi.y < 0 && this._verticalBar.value > 0) {
540
- this._verticalBar.value -= this._wheelPrecision;
29
+ /**
30
+ * Gets the vertical scrollbar
31
+ */
32
+ get verticalBar() {
33
+ return this._verticalBar;
34
+ }
35
+ /**
36
+ * Adds a new control to the current container
37
+ * @param control defines the control to add
38
+ * @returns the current container
39
+ */
40
+ addControl(control) {
41
+ if (!control) {
42
+ return this;
541
43
  }
542
- else if (pi.y > 0 && this._verticalBar.value < this._verticalBar.maximum) {
543
- this._verticalBar.value += this._wheelPrecision;
44
+ this._window.addControl(control);
45
+ return this;
46
+ }
47
+ /**
48
+ * Removes a control from the current container
49
+ * @param control defines the control to remove
50
+ * @returns the current container
51
+ */
52
+ removeControl(control) {
53
+ this._window.removeControl(control);
54
+ return this;
55
+ }
56
+ /** Gets the list of children */
57
+ get children() {
58
+ return this._window.children;
59
+ }
60
+ _flagDescendantsAsMatrixDirty() {
61
+ for (const child of this._children) {
62
+ child._markMatrixAsDirty();
544
63
  }
545
64
  }
546
- if (this._horizontalBar.isVisible == true) {
547
- if (pi.x < 0 && this._horizontalBar.value < this._horizontalBar.maximum) {
548
- this._horizontalBar.value += this._wheelPrecision;
65
+ /**
66
+ * Freezes or unfreezes the controls in the window.
67
+ * When controls are frozen, the scroll viewer can render a lot more quickly but updates to positions/sizes of controls
68
+ * are not taken into account. If you want to change positions/sizes, unfreeze, perform the changes then freeze again
69
+ */
70
+ get freezeControls() {
71
+ return this._window.freezeControls;
72
+ }
73
+ set freezeControls(value) {
74
+ this._window.freezeControls = value;
75
+ }
76
+ /** Gets the bucket width */
77
+ get bucketWidth() {
78
+ return this._window.bucketWidth;
79
+ }
80
+ /** Gets the bucket height */
81
+ get bucketHeight() {
82
+ return this._window.bucketHeight;
83
+ }
84
+ /**
85
+ * Sets the bucket sizes.
86
+ * When freezeControls is true, setting a non-zero bucket size will improve performances by updating only
87
+ * controls that are visible. The bucket sizes is used to subdivide (internally) the window area to smaller areas into which
88
+ * controls are dispatched. So, the size should be roughly equals to the mean size of all the controls of
89
+ * the window. To disable the usage of buckets, sets either width or height (or both) to 0.
90
+ * Please note that using this option will raise the memory usage (the higher the bucket sizes, the less memory
91
+ * used), that's why it is not enabled by default.
92
+ * @param width width of the bucket
93
+ * @param height height of the bucket
94
+ */
95
+ setBucketSizes(width, height) {
96
+ this._window.setBucketSizes(width, height);
97
+ }
98
+ /**
99
+ * Forces the horizontal scroll bar to be displayed
100
+ */
101
+ get forceHorizontalBar() {
102
+ return this._forceHorizontalBar;
103
+ }
104
+ set forceHorizontalBar(value) {
105
+ this._grid.setRowDefinition(1, value ? this._barSize : 0, true);
106
+ this._horizontalBar.isVisible = value;
107
+ this._forceHorizontalBar = value;
108
+ }
109
+ /**
110
+ * Forces the vertical scroll bar to be displayed
111
+ */
112
+ get forceVerticalBar() {
113
+ return this._forceVerticalBar;
114
+ }
115
+ set forceVerticalBar(value) {
116
+ this._grid.setColumnDefinition(1, value ? this._barSize : 0, true);
117
+ this._verticalBar.isVisible = value;
118
+ this._forceVerticalBar = value;
119
+ }
120
+ /**
121
+ * Creates a new ScrollViewer
122
+ * @param name of ScrollViewer
123
+ * @param isImageBased
124
+ */
125
+ constructor(name, isImageBased) {
126
+ super(name);
127
+ this._grid = __runInitializers(this, _instanceExtraInitializers);
128
+ this._barSize = 20;
129
+ this._pointerIsOver = false;
130
+ this._wheelPrecision = 0.05;
131
+ this._thumbLength = 0.5;
132
+ this._thumbHeight = 1;
133
+ this._barImageHeight = 1;
134
+ this._horizontalBarImageHeight = 1;
135
+ this._verticalBarImageHeight = 1;
136
+ this._oldWindowContentsWidth = 0;
137
+ this._oldWindowContentsHeight = 0;
138
+ this._forceHorizontalBar = false;
139
+ this._forceVerticalBar = false;
140
+ this._useImageBar = isImageBased ? isImageBased : false;
141
+ this.onDirtyObservable.add(() => {
142
+ this._horizontalBarSpace.color = this.color;
143
+ this._verticalBarSpace.color = this.color;
144
+ this._dragSpace.color = this.color;
145
+ });
146
+ this.onPointerEnterObservable.add(() => {
147
+ this._pointerIsOver = true;
148
+ });
149
+ this.onPointerOutObservable.add(() => {
150
+ this._pointerIsOver = false;
151
+ });
152
+ this._grid = new Grid();
153
+ if (this._useImageBar) {
154
+ this._horizontalBar = new ImageScrollBar();
155
+ this._verticalBar = new ImageScrollBar();
156
+ }
157
+ else {
158
+ this._horizontalBar = new ScrollBar();
159
+ this._verticalBar = new ScrollBar();
549
160
  }
550
- else if (pi.x > 0 && this._horizontalBar.value > 0) {
551
- this._horizontalBar.value -= this._wheelPrecision;
161
+ this._window = new _ScrollViewerWindow("scrollViewer_window");
162
+ this._window.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;
163
+ this._window.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;
164
+ this._grid.addColumnDefinition(1);
165
+ this._grid.addColumnDefinition(0, true);
166
+ this._grid.addRowDefinition(1);
167
+ this._grid.addRowDefinition(0, true);
168
+ super.addControl(this._grid);
169
+ this._grid.addControl(this._window, 0, 0);
170
+ this._verticalBarSpace = new Rectangle();
171
+ this._verticalBarSpace.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;
172
+ this._verticalBarSpace.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;
173
+ this._verticalBarSpace.thickness = 1;
174
+ this._grid.addControl(this._verticalBarSpace, 0, 1);
175
+ this._addBar(this._verticalBar, this._verticalBarSpace, true, Math.PI);
176
+ this._horizontalBarSpace = new Rectangle();
177
+ this._horizontalBarSpace.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;
178
+ this._horizontalBarSpace.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;
179
+ this._horizontalBarSpace.thickness = 1;
180
+ this._grid.addControl(this._horizontalBarSpace, 1, 0);
181
+ this._addBar(this._horizontalBar, this._horizontalBarSpace, false, 0);
182
+ this._dragSpace = new Rectangle();
183
+ this._dragSpace.thickness = 1;
184
+ this._grid.addControl(this._dragSpace, 1, 1);
185
+ this._grid.clipChildren = false;
186
+ // Colors
187
+ if (!this._useImageBar) {
188
+ this.barColor = "grey";
189
+ this.barBackground = "transparent";
552
190
  }
553
191
  }
554
- });
555
- }
556
- _renderHighlightSpecific(context) {
557
- if (!this.isHighlighted) {
558
- return;
559
- }
560
- super._renderHighlightSpecific(context);
561
- this._grid._renderHighlightSpecific(context);
562
- context.restore();
563
- }
564
- /** Releases associated resources */
565
- dispose() {
566
- this.onWheelObservable.remove(this._onWheelObserver);
567
- this._onWheelObserver = null;
568
- super.dispose();
569
- }
570
- }
571
- __decorate([
572
- serialize()
573
- ], ScrollViewer.prototype, "wheelPrecision", null);
574
- __decorate([
575
- serialize()
576
- ], ScrollViewer.prototype, "scrollBackground", null);
577
- __decorate([
578
- serialize()
579
- ], ScrollViewer.prototype, "barColor", null);
580
- __decorate([
581
- serialize()
582
- ], ScrollViewer.prototype, "barSize", null);
583
- __decorate([
584
- serialize()
585
- ], ScrollViewer.prototype, "barBackground", null);
192
+ /** Reset the scroll viewer window to initial size */
193
+ resetWindow() {
194
+ this._window.width = "100%";
195
+ this._window.height = "100%";
196
+ }
197
+ _getTypeName() {
198
+ return "ScrollViewer";
199
+ }
200
+ _buildClientSizes() {
201
+ const ratio = this.host.idealRatio;
202
+ this._window.parentClientWidth = this._currentMeasure.width - (this._verticalBar.isVisible || this.forceVerticalBar ? this._barSize * ratio : 0) - 2 * this.thickness;
203
+ this._window.parentClientHeight = this._currentMeasure.height - (this._horizontalBar.isVisible || this.forceHorizontalBar ? this._barSize * ratio : 0) - 2 * this.thickness;
204
+ this._clientWidth = this._window.parentClientWidth;
205
+ this._clientHeight = this._window.parentClientHeight;
206
+ }
207
+ _additionalProcessing(parentMeasure, context) {
208
+ super._additionalProcessing(parentMeasure, context);
209
+ this._buildClientSizes();
210
+ }
211
+ _postMeasure() {
212
+ super._postMeasure();
213
+ this._updateScroller();
214
+ this._setWindowPosition(false);
215
+ }
216
+ /**
217
+ * Gets or sets the mouse wheel precision
218
+ * from 0 to 1 with a default value of 0.05
219
+ * */
220
+ get wheelPrecision() {
221
+ return this._wheelPrecision;
222
+ }
223
+ set wheelPrecision(value) {
224
+ if (this._wheelPrecision === value) {
225
+ return;
226
+ }
227
+ if (value < 0) {
228
+ value = 0;
229
+ }
230
+ if (value > 1) {
231
+ value = 1;
232
+ }
233
+ this._wheelPrecision = value;
234
+ }
235
+ /** Gets or sets the scroll bar container background color */
236
+ get scrollBackground() {
237
+ return this._horizontalBarSpace.background;
238
+ }
239
+ set scrollBackground(color) {
240
+ if (this._horizontalBarSpace.background === color) {
241
+ return;
242
+ }
243
+ this._horizontalBarSpace.background = color;
244
+ this._verticalBarSpace.background = color;
245
+ }
246
+ /** Gets or sets the bar color */
247
+ get barColor() {
248
+ return this._barColor;
249
+ }
250
+ set barColor(color) {
251
+ if (this._barColor === color) {
252
+ return;
253
+ }
254
+ this._barColor = color;
255
+ this._horizontalBar.color = color;
256
+ this._verticalBar.color = color;
257
+ }
258
+ /** Gets or sets the bar image */
259
+ get thumbImage() {
260
+ return this._barImage;
261
+ }
262
+ set thumbImage(value) {
263
+ if (this._barImage === value) {
264
+ return;
265
+ }
266
+ this._barImage = value;
267
+ const hb = this._horizontalBar;
268
+ const vb = this._verticalBar;
269
+ hb.thumbImage = value;
270
+ vb.thumbImage = value;
271
+ }
272
+ /** Gets or sets the horizontal bar image */
273
+ get horizontalThumbImage() {
274
+ return this._horizontalBarImage;
275
+ }
276
+ set horizontalThumbImage(value) {
277
+ if (this._horizontalBarImage === value) {
278
+ return;
279
+ }
280
+ this._horizontalBarImage = value;
281
+ const hb = this._horizontalBar;
282
+ hb.thumbImage = value;
283
+ }
284
+ /** Gets or sets the vertical bar image */
285
+ get verticalThumbImage() {
286
+ return this._verticalBarImage;
287
+ }
288
+ set verticalThumbImage(value) {
289
+ if (this._verticalBarImage === value) {
290
+ return;
291
+ }
292
+ this._verticalBarImage = value;
293
+ const vb = this._verticalBar;
294
+ vb.thumbImage = value;
295
+ }
296
+ /** Gets or sets the size of the bar */
297
+ get barSize() {
298
+ return this._barSize;
299
+ }
300
+ set barSize(value) {
301
+ if (this._barSize === value) {
302
+ return;
303
+ }
304
+ this._barSize = value;
305
+ this._markAsDirty();
306
+ if (this._horizontalBar.isVisible) {
307
+ this._grid.setRowDefinition(1, this._barSize, true);
308
+ }
309
+ if (this._verticalBar.isVisible) {
310
+ this._grid.setColumnDefinition(1, this._barSize, true);
311
+ }
312
+ }
313
+ /** Gets or sets the length of the thumb */
314
+ get thumbLength() {
315
+ return this._thumbLength;
316
+ }
317
+ set thumbLength(value) {
318
+ if (this._thumbLength === value) {
319
+ return;
320
+ }
321
+ if (value <= 0) {
322
+ value = 0.1;
323
+ }
324
+ if (value > 1) {
325
+ value = 1;
326
+ }
327
+ this._thumbLength = value;
328
+ const hb = this._horizontalBar;
329
+ const vb = this._verticalBar;
330
+ hb.thumbLength = value;
331
+ vb.thumbLength = value;
332
+ this._markAsDirty();
333
+ }
334
+ /** Gets or sets the height of the thumb */
335
+ get thumbHeight() {
336
+ return this._thumbHeight;
337
+ }
338
+ set thumbHeight(value) {
339
+ if (this._thumbHeight === value) {
340
+ return;
341
+ }
342
+ if (value <= 0) {
343
+ value = 0.1;
344
+ }
345
+ if (value > 1) {
346
+ value = 1;
347
+ }
348
+ this._thumbHeight = value;
349
+ const hb = this._horizontalBar;
350
+ const vb = this._verticalBar;
351
+ hb.thumbHeight = value;
352
+ vb.thumbHeight = value;
353
+ this._markAsDirty();
354
+ }
355
+ /** Gets or sets the height of the bar image */
356
+ get barImageHeight() {
357
+ return this._barImageHeight;
358
+ }
359
+ set barImageHeight(value) {
360
+ if (this._barImageHeight === value) {
361
+ return;
362
+ }
363
+ if (value <= 0) {
364
+ value = 0.1;
365
+ }
366
+ if (value > 1) {
367
+ value = 1;
368
+ }
369
+ this._barImageHeight = value;
370
+ const hb = this._horizontalBar;
371
+ const vb = this._verticalBar;
372
+ hb.barImageHeight = value;
373
+ vb.barImageHeight = value;
374
+ this._markAsDirty();
375
+ }
376
+ /** Gets or sets the height of the horizontal bar image */
377
+ get horizontalBarImageHeight() {
378
+ return this._horizontalBarImageHeight;
379
+ }
380
+ set horizontalBarImageHeight(value) {
381
+ if (this._horizontalBarImageHeight === value) {
382
+ return;
383
+ }
384
+ if (value <= 0) {
385
+ value = 0.1;
386
+ }
387
+ if (value > 1) {
388
+ value = 1;
389
+ }
390
+ this._horizontalBarImageHeight = value;
391
+ const hb = this._horizontalBar;
392
+ hb.barImageHeight = value;
393
+ this._markAsDirty();
394
+ }
395
+ /** Gets or sets the height of the vertical bar image */
396
+ get verticalBarImageHeight() {
397
+ return this._verticalBarImageHeight;
398
+ }
399
+ set verticalBarImageHeight(value) {
400
+ if (this._verticalBarImageHeight === value) {
401
+ return;
402
+ }
403
+ if (value <= 0) {
404
+ value = 0.1;
405
+ }
406
+ if (value > 1) {
407
+ value = 1;
408
+ }
409
+ this._verticalBarImageHeight = value;
410
+ const vb = this._verticalBar;
411
+ vb.barImageHeight = value;
412
+ this._markAsDirty();
413
+ }
414
+ /** Gets or sets the bar background */
415
+ get barBackground() {
416
+ return this._barBackground;
417
+ }
418
+ set barBackground(color) {
419
+ if (this._barBackground === color) {
420
+ return;
421
+ }
422
+ this._barBackground = color;
423
+ const hb = this._horizontalBar;
424
+ const vb = this._verticalBar;
425
+ hb.background = color;
426
+ vb.background = color;
427
+ this._dragSpace.background = color;
428
+ }
429
+ /** Gets or sets the bar background image */
430
+ get barImage() {
431
+ return this._barBackgroundImage;
432
+ }
433
+ set barImage(value) {
434
+ this._barBackgroundImage = value;
435
+ const hb = this._horizontalBar;
436
+ const vb = this._verticalBar;
437
+ hb.backgroundImage = value;
438
+ vb.backgroundImage = value;
439
+ }
440
+ /** Gets or sets the horizontal bar background image */
441
+ get horizontalBarImage() {
442
+ return this._horizontalBarBackgroundImage;
443
+ }
444
+ set horizontalBarImage(value) {
445
+ this._horizontalBarBackgroundImage = value;
446
+ const hb = this._horizontalBar;
447
+ hb.backgroundImage = value;
448
+ }
449
+ /** Gets or sets the vertical bar background image */
450
+ get verticalBarImage() {
451
+ return this._verticalBarBackgroundImage;
452
+ }
453
+ set verticalBarImage(value) {
454
+ this._verticalBarBackgroundImage = value;
455
+ const vb = this._verticalBar;
456
+ vb.backgroundImage = value;
457
+ }
458
+ _setWindowPosition(force = true) {
459
+ const ratio = this.host.idealRatio;
460
+ const windowContentsWidth = this._window._currentMeasure.width;
461
+ const windowContentsHeight = this._window._currentMeasure.height;
462
+ if (!force && this._oldWindowContentsWidth === windowContentsWidth && this._oldWindowContentsHeight === windowContentsHeight) {
463
+ return;
464
+ }
465
+ this._oldWindowContentsWidth = windowContentsWidth;
466
+ this._oldWindowContentsHeight = windowContentsHeight;
467
+ const _endLeft = this._clientWidth - windowContentsWidth;
468
+ const _endTop = this._clientHeight - windowContentsHeight;
469
+ const newLeft = (this._horizontalBar.value / ratio) * _endLeft + "px";
470
+ const newTop = (this._verticalBar.value / ratio) * _endTop + "px";
471
+ if (newLeft !== this._window.left) {
472
+ this._window.left = newLeft;
473
+ if (!this.freezeControls) {
474
+ this._rebuildLayout = true;
475
+ }
476
+ }
477
+ if (newTop !== this._window.top) {
478
+ this._window.top = newTop;
479
+ if (!this.freezeControls) {
480
+ this._rebuildLayout = true;
481
+ }
482
+ }
483
+ }
484
+ /** @internal */
485
+ _updateScroller() {
486
+ const windowContentsWidth = this._window._currentMeasure.width;
487
+ const windowContentsHeight = this._window._currentMeasure.height;
488
+ if (this._horizontalBar.isVisible && windowContentsWidth <= this._clientWidth && !this.forceHorizontalBar) {
489
+ this._grid.setRowDefinition(1, 0, true);
490
+ this._horizontalBar.isVisible = false;
491
+ this._horizontalBar.value = 0;
492
+ this._rebuildLayout = true;
493
+ }
494
+ else if (!this._horizontalBar.isVisible && (windowContentsWidth > this._clientWidth || this.forceHorizontalBar)) {
495
+ this._grid.setRowDefinition(1, this._barSize, true);
496
+ this._horizontalBar.isVisible = true;
497
+ this._rebuildLayout = true;
498
+ }
499
+ if (this._verticalBar.isVisible && windowContentsHeight <= this._clientHeight && !this.forceVerticalBar) {
500
+ this._grid.setColumnDefinition(1, 0, true);
501
+ this._verticalBar.isVisible = false;
502
+ this._verticalBar.value = 0;
503
+ this._rebuildLayout = true;
504
+ }
505
+ else if (!this._verticalBar.isVisible && (windowContentsHeight > this._clientHeight || this.forceVerticalBar)) {
506
+ this._grid.setColumnDefinition(1, this._barSize, true);
507
+ this._verticalBar.isVisible = true;
508
+ this._rebuildLayout = true;
509
+ }
510
+ this._buildClientSizes();
511
+ const ratio = this.host.idealRatio;
512
+ this._horizontalBar.thumbWidth = this._thumbLength * 0.9 * (this._clientWidth / ratio) + "px";
513
+ this._verticalBar.thumbWidth = this._thumbLength * 0.9 * (this._clientHeight / ratio) + "px";
514
+ }
515
+ _link(host) {
516
+ super._link(host);
517
+ this._attachWheel();
518
+ }
519
+ /**
520
+ * @internal
521
+ */
522
+ _addBar(barControl, barContainer, isVertical, rotation) {
523
+ barControl.paddingLeft = 0;
524
+ barControl.width = "100%";
525
+ barControl.height = "100%";
526
+ barControl.barOffset = 0;
527
+ barControl.value = 0;
528
+ barControl.maximum = 1;
529
+ barControl.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;
530
+ barControl.verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;
531
+ barControl.isVertical = isVertical;
532
+ barControl.rotation = rotation;
533
+ barControl.isVisible = false;
534
+ barContainer.addControl(barControl);
535
+ barControl.onValueChangedObservable.add(() => {
536
+ this._setWindowPosition();
537
+ });
538
+ }
539
+ /** @internal */
540
+ _attachWheel() {
541
+ if (!this._host || this._onWheelObserver) {
542
+ return;
543
+ }
544
+ this._onWheelObserver = this.onWheelObservable.add((pi) => {
545
+ if (!this._pointerIsOver || this.isReadOnly) {
546
+ return;
547
+ }
548
+ if (this._verticalBar.isVisible == true) {
549
+ if (pi.y < 0 && this._verticalBar.value > 0) {
550
+ this._verticalBar.value -= this._wheelPrecision;
551
+ }
552
+ else if (pi.y > 0 && this._verticalBar.value < this._verticalBar.maximum) {
553
+ this._verticalBar.value += this._wheelPrecision;
554
+ }
555
+ }
556
+ if (this._horizontalBar.isVisible == true) {
557
+ if (pi.x < 0 && this._horizontalBar.value < this._horizontalBar.maximum) {
558
+ this._horizontalBar.value += this._wheelPrecision;
559
+ }
560
+ else if (pi.x > 0 && this._horizontalBar.value > 0) {
561
+ this._horizontalBar.value -= this._wheelPrecision;
562
+ }
563
+ }
564
+ });
565
+ }
566
+ _renderHighlightSpecific(context) {
567
+ if (!this.isHighlighted) {
568
+ return;
569
+ }
570
+ super._renderHighlightSpecific(context);
571
+ this._grid._renderHighlightSpecific(context);
572
+ context.restore();
573
+ }
574
+ /** Releases associated resources */
575
+ dispose() {
576
+ this.onWheelObservable.remove(this._onWheelObserver);
577
+ this._onWheelObserver = null;
578
+ super.dispose();
579
+ }
580
+ },
581
+ (() => {
582
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
583
+ _get_wheelPrecision_decorators = [serialize()];
584
+ _get_scrollBackground_decorators = [serialize()];
585
+ _get_barColor_decorators = [serialize()];
586
+ _get_barSize_decorators = [serialize()];
587
+ _get_barBackground_decorators = [serialize()];
588
+ __esDecorate(_a, null, _get_wheelPrecision_decorators, { kind: "getter", name: "wheelPrecision", static: false, private: false, access: { has: obj => "wheelPrecision" in obj, get: obj => obj.wheelPrecision }, metadata: _metadata }, null, _instanceExtraInitializers);
589
+ __esDecorate(_a, null, _get_scrollBackground_decorators, { kind: "getter", name: "scrollBackground", static: false, private: false, access: { has: obj => "scrollBackground" in obj, get: obj => obj.scrollBackground }, metadata: _metadata }, null, _instanceExtraInitializers);
590
+ __esDecorate(_a, null, _get_barColor_decorators, { kind: "getter", name: "barColor", static: false, private: false, access: { has: obj => "barColor" in obj, get: obj => obj.barColor }, metadata: _metadata }, null, _instanceExtraInitializers);
591
+ __esDecorate(_a, null, _get_barSize_decorators, { kind: "getter", name: "barSize", static: false, private: false, access: { has: obj => "barSize" in obj, get: obj => obj.barSize }, metadata: _metadata }, null, _instanceExtraInitializers);
592
+ __esDecorate(_a, null, _get_barBackground_decorators, { kind: "getter", name: "barBackground", static: false, private: false, access: { has: obj => "barBackground" in obj, get: obj => obj.barBackground }, metadata: _metadata }, null, _instanceExtraInitializers);
593
+ if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
594
+ })(),
595
+ _a;
596
+ })();
597
+ export { ScrollViewer };
586
598
  let _Registered = false;
587
599
  /**
588
600
  * Registers the ScrollViewer class with the type store for serialization support.