Forráskód Böngészése

Flow: fix autoSize not playing well with absolute children

trethaller 3 éve
szülő
commit
523416daf1
1 módosított fájl, 8 hozzáadás és 4 törlés
  1. 8 4
      h2d/Flow.hx

+ 8 - 4
h2d/Flow.hx

@@ -1241,8 +1241,10 @@ class Flow extends Object {
 				autoWidth -= horizontalSpacing;
 				if(p.autoSize == null) {
 					calcSize(p, c);
-					// if( p.calculatedHeight > maxLineHeight ) maxLineHeight = p.calculatedHeight;
-					autoWidth -= p.calculatedWidth;
+					if(!p.isAbsolute) {
+						if( p.calculatedHeight > maxLineHeight ) maxLineHeight = p.calculatedHeight;
+						autoWidth -= p.calculatedWidth;
+					}
 				}
 				else
 					autoSum += p.autoSize;
@@ -1402,8 +1404,10 @@ class Flow extends Object {
 				autoHeight -= verticalSpacing;
 				if(p.autoSize == null) {
 					calcSize(p, c);
-					// if( p.calculatedWidth > maxColWidth ) maxColWidth = p.calculatedWidth;
-					autoHeight -= p.calculatedHeight;
+					if(!p.isAbsolute) {
+						if( p.calculatedWidth > maxColWidth ) maxColWidth = p.calculatedWidth;
+						autoHeight -= p.calculatedHeight;
+					}
 				}
 				else
 					autoSum += p.autoSize;