Explorar el Código

Added more properties to slider

David Catuhe hace 8 años
padre
commit
383d8ed84d

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 6706 - 6706
dist/preview release/babylon.d.ts


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 6706 - 6706
dist/preview release/babylon.module.d.ts


+ 2 - 0
dist/preview release/gui/babylon.gui.d.ts

@@ -367,6 +367,8 @@ declare module BABYLON.GUI {
         borderColor: string;
         foreground: string;
         background: string;
+        barOffset: string | number;
+        thumbWidth: string | number;
         minimum: number;
         maximum: number;
         value: number;

+ 30 - 0
dist/preview release/gui/babylon.gui.js

@@ -2044,6 +2044,36 @@ var BABYLON;
                 enumerable: true,
                 configurable: true
             });
+            Object.defineProperty(Slider.prototype, "barOffset", {
+                get: function () {
+                    return this._barOffset.toString(this._host);
+                },
+                set: function (value) {
+                    if (this._barOffset.toString(this._host) === value) {
+                        return;
+                    }
+                    if (this._barOffset.fromString(value)) {
+                        this._markAsDirty();
+                    }
+                },
+                enumerable: true,
+                configurable: true
+            });
+            Object.defineProperty(Slider.prototype, "thumbWidth", {
+                get: function () {
+                    return this._thumbWidth.toString(this._host);
+                },
+                set: function (value) {
+                    if (this._thumbWidth.toString(this._host) === value) {
+                        return;
+                    }
+                    if (this._thumbWidth.fromString(value)) {
+                        this._markAsDirty();
+                    }
+                },
+                enumerable: true,
+                configurable: true
+            });
             Object.defineProperty(Slider.prototype, "minimum", {
                 get: function () {
                     return this._minimum;

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


+ 29 - 1
gui/src/controls/slider.ts

@@ -52,7 +52,35 @@ module BABYLON.GUI {
 
             this._background = value;
             this._markAsDirty();
-        }         
+        }     
+
+        public get barOffset(): string | number  {
+            return this._barOffset.toString(this._host);
+        }
+
+        public set barOffset(value: string | number ) {
+            if (this._barOffset.toString(this._host) === value) {
+                return;
+            }
+
+            if (this._barOffset.fromString(value)) {
+                this._markAsDirty();
+            }
+        }      
+
+        public get thumbWidth(): string | number  {
+            return this._thumbWidth.toString(this._host);
+        }
+
+        public set thumbWidth(value: string | number ) {
+            if (this._thumbWidth.toString(this._host) === value) {
+                return;
+            }
+
+            if (this._thumbWidth.fromString(value)) {
+                this._markAsDirty();
+            }
+        }              
 
         public get minimum(): number {
             return this._minimum;