Ver código fonte

Merge pull request #3292 from BabylonJS/master

Nightly
sebavan 7 anos atrás
pai
commit
3e030b3af6

Diferenças do arquivo suprimidas por serem muito extensas
+ 8325 - 8325
Playground/babylon.d.txt


Diferenças do arquivo suprimidas por serem muito extensas
+ 8194 - 8194
dist/preview release/babylon.d.ts


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

@@ -3523,7 +3523,11 @@ var BABYLON;
                     return this._cellWidth;
                 },
                 set: function (value) {
+                    if (this._cellWidth === value) {
+                        return;
+                    }
                     this._cellWidth = value;
+                    this._markAsDirty();
                 },
                 enumerable: true,
                 configurable: true
@@ -3533,7 +3537,11 @@ var BABYLON;
                     return this._cellHeight;
                 },
                 set: function (value) {
+                    if (this._cellHeight === value) {
+                        return;
+                    }
                     this._cellHeight = value;
+                    this._markAsDirty();
                 },
                 enumerable: true,
                 configurable: true
@@ -3543,7 +3551,11 @@ var BABYLON;
                     return this._cellId;
                 },
                 set: function (value) {
+                    if (this._cellId === value) {
+                        return;
+                    }
                     this._cellId = value;
+                    this._markAsDirty();
                 },
                 enumerable: true,
                 configurable: true

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


+ 15 - 0
gui/src/controls/image.ts

@@ -159,21 +159,36 @@ module BABYLON.GUI {
             return this._cellWidth;
         }
         set cellWidth(value: number) {
+            if(this._cellWidth === value){
+                return;
+            }
+            
             this._cellWidth = value;
+            this._markAsDirty();
         }
 
         get cellHeight(): number {
             return this._cellHeight;
         }
         set cellHeight(value: number) {
+            if(this._cellHeight === value){
+                return;
+            }
+            
             this._cellHeight = value;
+            this._markAsDirty();
         }
 
         get cellId(): number {
             return this._cellId;
         }
         set cellId(value: number) {
+            if (this._cellId === value) {
+                 return;
+             }
+            
             this._cellId = value;
+            this._markAsDirty();
         }
 
         constructor(public name?: string, url: Nullable<string> = null) {