@babylonjs/gui 9.12.1 → 9.14.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/FrameGraph/pure.d.ts +2 -0
- package/2D/FrameGraph/pure.js +3 -0
- package/2D/FrameGraph/pure.js.map +1 -0
- package/2D/FrameGraph/renderGraphGUIBlock.d.ts +3 -41
- package/2D/FrameGraph/renderGraphGUIBlock.js +5 -64
- package/2D/FrameGraph/renderGraphGUIBlock.js.map +1 -1
- package/2D/FrameGraph/renderGraphGUIBlock.pure.d.ts +48 -0
- package/2D/FrameGraph/renderGraphGUIBlock.pure.js +78 -0
- package/2D/FrameGraph/renderGraphGUIBlock.pure.js.map +1 -0
- package/2D/controls/button.d.ts +3 -107
- package/2D/controls/button.js +5 -243
- package/2D/controls/button.js.map +1 -1
- package/2D/controls/button.pure.d.ts +114 -0
- package/2D/controls/button.pure.js +257 -0
- package/2D/controls/button.pure.js.map +1 -0
- package/2D/controls/checkbox.d.ts +3 -51
- package/2D/controls/checkbox.js +5 -161
- package/2D/controls/checkbox.js.map +1 -1
- package/2D/controls/checkbox.pure.d.ts +58 -0
- package/2D/controls/checkbox.pure.js +175 -0
- package/2D/controls/checkbox.pure.js.map +1 -0
- package/2D/controls/colorpicker.d.ts +5 -101
- package/2D/controls/colorpicker.js +7 -1394
- package/2D/controls/colorpicker.js.map +1 -1
- package/2D/controls/colorpicker.pure.d.ts +106 -0
- package/2D/controls/colorpicker.pure.js +1406 -0
- package/2D/controls/colorpicker.pure.js.map +1 -0
- package/2D/controls/container.d.ts +3 -177
- package/2D/controls/container.js +5 -615
- package/2D/controls/container.js.map +1 -1
- package/2D/controls/container.pure.d.ts +184 -0
- package/2D/controls/container.pure.js +629 -0
- package/2D/controls/container.pure.js.map +1 -0
- package/2D/controls/control.d.ts +3 -944
- package/2D/controls/control.js +5 -2457
- package/2D/controls/control.js.map +1 -1
- package/2D/controls/control.pure.d.ts +951 -0
- package/2D/controls/control.pure.js +2471 -0
- package/2D/controls/control.pure.js.map +1 -0
- package/2D/controls/displayGrid.d.ts +5 -53
- package/2D/controls/displayGrid.js +7 -201
- package/2D/controls/displayGrid.js.map +1 -1
- package/2D/controls/displayGrid.pure.d.ts +58 -0
- package/2D/controls/displayGrid.pure.js +213 -0
- package/2D/controls/displayGrid.pure.js.map +1 -0
- package/2D/controls/ellipse.d.ts +5 -25
- package/2D/controls/ellipse.js +7 -92
- package/2D/controls/ellipse.js.map +1 -1
- package/2D/controls/ellipse.pure.d.ts +30 -0
- package/2D/controls/ellipse.pure.js +104 -0
- package/2D/controls/ellipse.pure.js.map +1 -0
- package/2D/controls/focusableButton.d.ts +3 -15
- package/2D/controls/focusableButton.js +5 -22
- package/2D/controls/focusableButton.js.map +1 -1
- package/2D/controls/focusableButton.pure.d.ts +22 -0
- package/2D/controls/focusableButton.pure.js +36 -0
- package/2D/controls/focusableButton.pure.js.map +1 -0
- package/2D/controls/gradient/LinearGradient.d.ts +3 -43
- package/2D/controls/gradient/LinearGradient.js +5 -70
- package/2D/controls/gradient/LinearGradient.js.map +1 -1
- package/2D/controls/gradient/LinearGradient.pure.d.ts +50 -0
- package/2D/controls/gradient/LinearGradient.pure.js +84 -0
- package/2D/controls/gradient/LinearGradient.pure.js.map +1 -0
- package/2D/controls/gradient/RadialGradient.d.ts +3 -51
- package/2D/controls/gradient/RadialGradient.js +5 -86
- package/2D/controls/gradient/RadialGradient.js.map +1 -1
- package/2D/controls/gradient/RadialGradient.pure.d.ts +58 -0
- package/2D/controls/gradient/RadialGradient.pure.js +100 -0
- package/2D/controls/gradient/RadialGradient.pure.js.map +1 -0
- package/2D/controls/gradient/pure.d.ts +3 -0
- package/2D/controls/gradient/pure.js +4 -0
- package/2D/controls/gradient/pure.js.map +1 -0
- package/2D/controls/grid.d.ts +3 -149
- package/2D/controls/grid.js +5 -525
- package/2D/controls/grid.js.map +1 -1
- package/2D/controls/grid.pure.d.ts +156 -0
- package/2D/controls/grid.pure.js +539 -0
- package/2D/controls/grid.pure.js.map +1 -0
- package/2D/controls/image.d.ts +3 -226
- package/2D/controls/image.js +5 -913
- package/2D/controls/image.js.map +1 -1
- package/2D/controls/image.pure.d.ts +233 -0
- package/2D/controls/image.pure.js +927 -0
- package/2D/controls/image.pure.js.map +1 -0
- package/2D/controls/inputPassword.d.ts +3 -7
- package/2D/controls/inputPassword.js +5 -19
- package/2D/controls/inputPassword.js.map +1 -1
- package/2D/controls/inputPassword.pure.d.ts +14 -0
- package/2D/controls/inputPassword.pure.js +33 -0
- package/2D/controls/inputPassword.pure.js.map +1 -0
- package/2D/controls/inputText.d.ts +3 -202
- package/2D/controls/inputText.js +5 -1050
- package/2D/controls/inputText.js.map +1 -1
- package/2D/controls/inputText.pure.d.ts +209 -0
- package/2D/controls/inputText.pure.js +1064 -0
- package/2D/controls/inputText.pure.js.map +1 -0
- package/2D/controls/inputTextArea.d.ts +3 -140
- package/2D/controls/inputTextArea.js +5 -1023
- package/2D/controls/inputTextArea.js.map +1 -1
- package/2D/controls/inputTextArea.pure.d.ts +147 -0
- package/2D/controls/inputTextArea.pure.js +1037 -0
- package/2D/controls/inputTextArea.pure.js.map +1 -0
- package/2D/controls/line.d.ts +5 -74
- package/2D/controls/line.js +7 -234
- package/2D/controls/line.js.map +1 -1
- package/2D/controls/line.pure.d.ts +79 -0
- package/2D/controls/line.pure.js +246 -0
- package/2D/controls/line.pure.js.map +1 -0
- package/2D/controls/multiLine.d.ts +3 -73
- package/2D/controls/multiLine.js +5 -234
- package/2D/controls/multiLine.js.map +1 -1
- package/2D/controls/multiLine.pure.d.ts +80 -0
- package/2D/controls/multiLine.pure.js +248 -0
- package/2D/controls/multiLine.pure.js.map +1 -0
- package/2D/controls/pure.d.ts +38 -0
- package/2D/controls/pure.js +39 -0
- package/2D/controls/pure.js.map +1 -0
- package/2D/controls/radioButton.d.ts +3 -47
- package/2D/controls/radioButton.js +5 -182
- package/2D/controls/radioButton.js.map +1 -1
- package/2D/controls/radioButton.pure.d.ts +54 -0
- package/2D/controls/radioButton.pure.js +196 -0
- package/2D/controls/radioButton.pure.js.map +1 -0
- package/2D/controls/rectangle.d.ts +5 -43
- package/2D/controls/rectangle.js +7 -205
- package/2D/controls/rectangle.js.map +1 -1
- package/2D/controls/rectangle.pure.d.ts +48 -0
- package/2D/controls/rectangle.pure.js +217 -0
- package/2D/controls/rectangle.pure.js.map +1 -0
- package/2D/controls/scrollViewers/pure.d.ts +2 -0
- package/2D/controls/scrollViewers/pure.js +3 -0
- package/2D/controls/scrollViewers/pure.js.map +1 -0
- package/2D/controls/scrollViewers/scrollViewer.d.ts +3 -176
- package/2D/controls/scrollViewers/scrollViewer.js +5 -584
- package/2D/controls/scrollViewers/scrollViewer.js.map +1 -1
- package/2D/controls/scrollViewers/scrollViewer.pure.d.ts +183 -0
- package/2D/controls/scrollViewers/scrollViewer.pure.js +598 -0
- package/2D/controls/scrollViewers/scrollViewer.pure.js.map +1 -0
- package/2D/controls/sliders/imageBasedSlider.d.ts +3 -45
- package/2D/controls/sliders/imageBasedSlider.js +5 -165
- package/2D/controls/sliders/imageBasedSlider.js.map +1 -1
- package/2D/controls/sliders/imageBasedSlider.pure.d.ts +52 -0
- package/2D/controls/sliders/imageBasedSlider.pure.js +179 -0
- package/2D/controls/sliders/imageBasedSlider.pure.js.map +1 -0
- package/2D/controls/sliders/pure.d.ts +4 -0
- package/2D/controls/sliders/pure.js +5 -0
- package/2D/controls/sliders/pure.js.map +1 -0
- package/2D/controls/sliders/scrollBar.d.ts +3 -48
- package/2D/controls/sliders/scrollBar.js +5 -170
- package/2D/controls/sliders/scrollBar.js.map +1 -1
- package/2D/controls/sliders/scrollBar.pure.d.ts +55 -0
- package/2D/controls/sliders/scrollBar.pure.js +184 -0
- package/2D/controls/sliders/scrollBar.pure.js.map +1 -0
- package/2D/controls/sliders/slider.d.ts +3 -44
- package/2D/controls/sliders/slider.js +5 -278
- package/2D/controls/sliders/slider.js.map +1 -1
- package/2D/controls/sliders/slider.pure.d.ts +51 -0
- package/2D/controls/sliders/slider.pure.js +292 -0
- package/2D/controls/sliders/slider.pure.js.map +1 -0
- package/2D/controls/stackPanel.d.ts +3 -62
- package/2D/controls/stackPanel.js +5 -243
- package/2D/controls/stackPanel.js.map +1 -1
- package/2D/controls/stackPanel.pure.d.ts +69 -0
- package/2D/controls/stackPanel.pure.js +257 -0
- package/2D/controls/stackPanel.pure.js.map +1 -0
- package/2D/controls/statics.d.ts +3 -4
- package/2D/controls/statics.js +5 -47
- package/2D/controls/statics.js.map +1 -1
- package/2D/controls/statics.pure.d.ts +11 -0
- package/2D/controls/statics.pure.js +61 -0
- package/2D/controls/statics.pure.js.map +1 -0
- package/2D/controls/textBlock.d.ts +3 -217
- package/2D/controls/textBlock.js +5 -676
- package/2D/controls/textBlock.js.map +1 -1
- package/2D/controls/textBlock.pure.d.ts +224 -0
- package/2D/controls/textBlock.pure.js +690 -0
- package/2D/controls/textBlock.pure.js.map +1 -0
- package/2D/controls/toggleButton.d.ts +3 -91
- package/2D/controls/toggleButton.js +5 -226
- package/2D/controls/toggleButton.js.map +1 -1
- package/2D/controls/toggleButton.pure.d.ts +98 -0
- package/2D/controls/toggleButton.pure.js +240 -0
- package/2D/controls/toggleButton.pure.js.map +1 -0
- package/2D/controls/virtualKeyboard.d.ts +3 -100
- package/2D/controls/virtualKeyboard.js +5 -272
- package/2D/controls/virtualKeyboard.js.map +1 -1
- package/2D/controls/virtualKeyboard.pure.d.ts +107 -0
- package/2D/controls/virtualKeyboard.pure.js +286 -0
- package/2D/controls/virtualKeyboard.pure.js.map +1 -0
- package/2D/pure.d.ts +13 -0
- package/2D/pure.js +15 -0
- package/2D/pure.js.map +1 -0
- package/3D/controls/pure.d.ts +23 -0
- package/3D/controls/pure.js +24 -0
- package/3D/controls/pure.js.map +1 -0
- package/3D/gizmos/pure.d.ts +3 -0
- package/3D/gizmos/pure.js +4 -0
- package/3D/gizmos/pure.js.map +1 -0
- package/3D/materials/fluent/fluentMaterial.d.ts +5 -100
- package/3D/materials/fluent/fluentMaterial.js +7 -305
- package/3D/materials/fluent/fluentMaterial.js.map +1 -1
- package/3D/materials/fluent/fluentMaterial.pure.d.ts +105 -0
- package/3D/materials/fluent/fluentMaterial.pure.js +317 -0
- package/3D/materials/fluent/fluentMaterial.pure.js.map +1 -0
- package/3D/materials/fluent/pure.d.ts +2 -0
- package/3D/materials/fluent/pure.js +3 -0
- package/3D/materials/fluent/pure.js.map +1 -0
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.d.ts +5 -164
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.js +7 -488
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.js.map +1 -1
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.pure.d.ts +169 -0
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.pure.js +500 -0
- package/3D/materials/fluentBackplate/fluentBackplateMaterial.pure.js.map +1 -0
- package/3D/materials/fluentBackplate/pure.d.ts +2 -0
- package/3D/materials/fluentBackplate/pure.js +3 -0
- package/3D/materials/fluentBackplate/pure.js.map +1 -0
- package/3D/materials/fluentButton/fluentButtonMaterial.d.ts +5 -200
- package/3D/materials/fluentButton/fluentButtonMaterial.js +7 -563
- package/3D/materials/fluentButton/fluentButtonMaterial.js.map +1 -1
- package/3D/materials/fluentButton/fluentButtonMaterial.pure.d.ts +205 -0
- package/3D/materials/fluentButton/fluentButtonMaterial.pure.js +575 -0
- package/3D/materials/fluentButton/fluentButtonMaterial.pure.js.map +1 -0
- package/3D/materials/fluentButton/pure.d.ts +2 -0
- package/3D/materials/fluentButton/pure.js +3 -0
- package/3D/materials/fluentButton/pure.js.map +1 -0
- package/3D/materials/handle/handleMaterial.d.ts +5 -66
- package/3D/materials/handle/handleMaterial.js +5 -118
- package/3D/materials/handle/handleMaterial.js.map +1 -1
- package/3D/materials/handle/handleMaterial.pure.d.ts +66 -0
- package/3D/materials/handle/handleMaterial.pure.js +119 -0
- package/3D/materials/handle/handleMaterial.pure.js.map +1 -0
- package/3D/materials/handle/pure.d.ts +2 -0
- package/3D/materials/handle/pure.js +3 -0
- package/3D/materials/handle/pure.js.map +1 -0
- package/3D/materials/mrdl/mrdlBackglowMaterial.d.ts +5 -85
- package/3D/materials/mrdl/mrdlBackglowMaterial.js +7 -299
- package/3D/materials/mrdl/mrdlBackglowMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlBackglowMaterial.pure.d.ts +90 -0
- package/3D/materials/mrdl/mrdlBackglowMaterial.pure.js +311 -0
- package/3D/materials/mrdl/mrdlBackglowMaterial.pure.js.map +1 -0
- package/3D/materials/mrdl/mrdlBackplateMaterial.d.ts +5 -145
- package/3D/materials/mrdl/mrdlBackplateMaterial.js +7 -433
- package/3D/materials/mrdl/mrdlBackplateMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlBackplateMaterial.pure.d.ts +157 -0
- package/3D/materials/mrdl/mrdlBackplateMaterial.pure.js +452 -0
- package/3D/materials/mrdl/mrdlBackplateMaterial.pure.js.map +1 -0
- package/3D/materials/mrdl/mrdlFrontplateMaterial.d.ts +5 -183
- package/3D/materials/mrdl/mrdlFrontplateMaterial.js +7 -532
- package/3D/materials/mrdl/mrdlFrontplateMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlFrontplateMaterial.pure.d.ts +188 -0
- package/3D/materials/mrdl/mrdlFrontplateMaterial.pure.js +544 -0
- package/3D/materials/mrdl/mrdlFrontplateMaterial.pure.js.map +1 -0
- package/3D/materials/mrdl/mrdlInnerquadMaterial.d.ts +5 -54
- package/3D/materials/mrdl/mrdlInnerquadMaterial.js +7 -227
- package/3D/materials/mrdl/mrdlInnerquadMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlInnerquadMaterial.pure.d.ts +59 -0
- package/3D/materials/mrdl/mrdlInnerquadMaterial.pure.js +239 -0
- package/3D/materials/mrdl/mrdlInnerquadMaterial.pure.js.map +1 -0
- package/3D/materials/mrdl/mrdlSliderBarMaterial.d.ts +5 -334
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js +7 -855
- package/3D/materials/mrdl/mrdlSliderBarMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlSliderBarMaterial.pure.d.ts +346 -0
- package/3D/materials/mrdl/mrdlSliderBarMaterial.pure.js +874 -0
- package/3D/materials/mrdl/mrdlSliderBarMaterial.pure.js.map +1 -0
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.d.ts +5 -334
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.js +7 -855
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.js.map +1 -1
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.pure.d.ts +346 -0
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.pure.js +874 -0
- package/3D/materials/mrdl/mrdlSliderThumbMaterial.pure.js.map +1 -0
- package/3D/materials/mrdl/pure.d.ts +7 -0
- package/3D/materials/mrdl/pure.js +8 -0
- package/3D/materials/mrdl/pure.js.map +1 -0
- package/3D/materials/pure.d.ts +6 -0
- package/3D/materials/pure.js +8 -0
- package/3D/materials/pure.js.map +1 -0
- package/3D/pure.d.ts +6 -0
- package/3D/pure.js +8 -0
- package/3D/pure.js.map +1 -0
- package/package.json +50 -3
- package/pure.d.ts +3 -0
- package/pure.js +5 -0
- package/pure.js.map +1 -0
|
@@ -0,0 +1,598 @@
|
|
|
1
|
+
import { __decorate } from "@babylonjs/core/tslib.es6.js";
|
|
2
|
+
import { Rectangle } from "../rectangle.pure.js";
|
|
3
|
+
import { Grid } from "../grid.pure.js";
|
|
4
|
+
import { Control } from "../control.pure.js";
|
|
5
|
+
import { _ScrollViewerWindow } from "./scrollViewerWindow.js";
|
|
6
|
+
import { ScrollBar } from "../sliders/scrollBar.pure.js";
|
|
7
|
+
import { ImageScrollBar } from "../sliders/imageScrollBar.js";
|
|
8
|
+
import { RegisterClass } from "@babylonjs/core/Misc/typeStore.js";
|
|
9
|
+
import { serialize } from "@babylonjs/core/Misc/decorators.js";
|
|
10
|
+
/**
|
|
11
|
+
* Class used to hold a viewer window and sliders in a grid
|
|
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;
|
|
537
|
+
}
|
|
538
|
+
if (this._verticalBar.isVisible == true) {
|
|
539
|
+
if (pi.y < 0 && this._verticalBar.value > 0) {
|
|
540
|
+
this._verticalBar.value -= this._wheelPrecision;
|
|
541
|
+
}
|
|
542
|
+
else if (pi.y > 0 && this._verticalBar.value < this._verticalBar.maximum) {
|
|
543
|
+
this._verticalBar.value += this._wheelPrecision;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
if (this._horizontalBar.isVisible == true) {
|
|
547
|
+
if (pi.x < 0 && this._horizontalBar.value < this._horizontalBar.maximum) {
|
|
548
|
+
this._horizontalBar.value += this._wheelPrecision;
|
|
549
|
+
}
|
|
550
|
+
else if (pi.x > 0 && this._horizontalBar.value > 0) {
|
|
551
|
+
this._horizontalBar.value -= this._wheelPrecision;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
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);
|
|
586
|
+
let _Registered = false;
|
|
587
|
+
/**
|
|
588
|
+
* Registers the ScrollViewer class with the type store for serialization support.
|
|
589
|
+
* Safe to call multiple times; only the first call has an effect.
|
|
590
|
+
*/
|
|
591
|
+
export function RegisterScrollViewer() {
|
|
592
|
+
if (_Registered) {
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
595
|
+
_Registered = true;
|
|
596
|
+
RegisterClass("BABYLON.GUI.ScrollViewer", ScrollViewer);
|
|
597
|
+
}
|
|
598
|
+
//# sourceMappingURL=scrollViewer.pure.js.map
|