瀏覽代碼

Update ScaleGrid

ShiroSmith 6 年之前
父節點
當前提交
cca273dcfc
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      h2d/ScaleGrid.hx

+ 5 - 0
h2d/ScaleGrid.hx

@@ -20,30 +20,35 @@ class ScaleGrid extends h2d.TileGroup {
 	}
 	}
 
 
 	function set_tileBorders(b) {
 	function set_tileBorders(b) {
+		if( tileBorders == b ) return b;
 		this.tileBorders = b;
 		this.tileBorders = b;
 		clear();
 		clear();
 		return b;
 		return b;
 	}
 	}
 
 
 	function set_width(w) {
 	function set_width(w) {
+		if( width == w ) return w;
 		this.width = w;
 		this.width = w;
 		clear();
 		clear();
 		return w;
 		return w;
 	}
 	}
 
 
 	function set_height(h) {
 	function set_height(h) {
+		if( height == h ) return h;
 		this.height = h;
 		this.height = h;
 		clear();
 		clear();
 		return h;
 		return h;
 	}
 	}
 
 
 	function set_borderWidth(w) {
 	function set_borderWidth(w) {
+		if( borderWidth == w ) return w;
 		this.borderWidth = w;
 		this.borderWidth = w;
 		clear();
 		clear();
 		return w;
 		return w;
 	}
 	}
 
 
 	function set_borderHeight(h) {
 	function set_borderHeight(h) {
+		if( borderHeight == h ) return h;
 		this.borderHeight = h;
 		this.borderHeight = h;
 		clear();
 		clear();
 		return h;
 		return h;