ソースを参照

fixed getBoundsRec with 1x1 tile

Nicolas Cannasse 4 ヶ月 前
コミット
bb619ab0a0
1 ファイル変更2 行追加0 行削除
  1. 2 0
      h2d/ScaleGrid.hx

+ 2 - 0
h2d/ScaleGrid.hx

@@ -176,6 +176,8 @@ class ScaleGrid extends h2d.TileGroup {
 	override function getBoundsRec(relativeTo, out, forSize) {
 	override function getBoundsRec(relativeTo, out, forSize) {
 		checkUpdate();
 		checkUpdate();
 		super.getBoundsRec(relativeTo, out, forSize);
 		super.getBoundsRec(relativeTo, out, forSize);
+		if( tile != null && tile.width == 1 && tile.height == 1 )
+			addBounds(relativeTo, out, 0, 0, width, height);
 	}
 	}
 
 
 	function checkUpdate() {
 	function checkUpdate() {