Browse Source

fixed removeChildren on Flow: should not clear special children

ncannasse 6 năm trước cách đây
mục cha
commit
882cd9cfc7
1 tập tin đã thay đổi với 12 bổ sung0 xóa
  1. 12 0
      h2d/Flow.hx

+ 12 - 0
h2d/Flow.hx

@@ -408,6 +408,18 @@ class Flow extends Object {
 		}
 	}
 
+	override function removeChildren() {
+		super.removeChildren();
+		if( background != null ) {
+			addChild(background);
+			properties[properties.length - 1].isAbsolute = true;
+		}
+		if( interactive != null ) {
+			addChild(interactive);
+			properties[properties.length - 1].isAbsolute = true;
+		}
+	}
+
 	override function sync(ctx:RenderContext) {
 		if( needReflow ) reflow();
 		super.sync(ctx);