Kaynağa Gözat

bugfix clear constraint on parent change

Nicolas Cannasse 4 yıl önce
ebeveyn
işleme
35edb91b94
1 değiştirilmiş dosya ile 8 ekleme ve 0 silme
  1. 8 0
      h2d/Flow.hx

+ 8 - 0
h2d/Flow.hx

@@ -650,6 +650,14 @@ class Flow extends Object {
 		updateConstraint();
 	}
 
+	override function onHierarchyMoved(parentChanged:Bool) {
+		super.onHierarchyMoved(parentChanged);
+		isConstraint = false;
+		constraintWidth = -1;
+		constraintHeight = -1;
+		updateConstraint();
+	}
+
 	override function contentChanged( s : Object ) {
 		while( s.parent != this )
 			s = s.parent;