bstouls 6 年之前
父節點
當前提交
a065ed0f14
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      h2d/Flow.hx

+ 3 - 1
h2d/Flow.hx

@@ -552,6 +552,9 @@ class Flow extends Object {
 		var maxWidth = maxTotWidth - (paddingLeft + paddingRight + borderWidth * 2);
 		var maxHeight = maxTotHeight - (paddingTop + paddingBottom + borderHeight * 2);
 
+		if( debug )
+			debugGraphics.clear();
+
 		var cw, ch;
 		if( !isVertical ) {
 			var halign = horizontalAlign == null ? Left : horizontalAlign;
@@ -818,7 +821,6 @@ class Flow extends Object {
 		needReflow = false;
 
 		if( debug ) {
-			debugGraphics.clear();
 			if( debugGraphics != children[children.length - 1] ) {
 				addChild(debugGraphics); // always on-top
 				needReflow = false;