浏览代码

Update image.ts

aWeirdo 7 年之前
父节点
当前提交
cdda8fc149
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      gui/src/controls/image.ts

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

@@ -159,6 +159,10 @@ module BABYLON.GUI {
             return this._cellWidth;
         }
         set cellWidth(value: number) {
+            if(this._cellWidth === value){
+                return;
+            )
+            
             this._cellWidth = value;
         }
 
@@ -166,6 +170,10 @@ module BABYLON.GUI {
             return this._cellHeight;
         }
         set cellHeight(value: number) {
+            if(this._cellHeight === value){
+                return;
+            )
+            
             this._cellHeight = value;
         }