Selaa lähdekoodia

Flow: fix incorrect spacing calculation in auto-width/height

trethaller 2 vuotta sitten
vanhempi
commit
90c27d249f
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      h2d/Flow.hx

+ 2 - 2
h2d/Flow.hx

@@ -1238,7 +1238,7 @@ class Flow extends Object {
 			}
 
 			forChildren(function(i, p, c) {
-				autoWidth -= horizontalSpacing;
+				if(i > 0) autoWidth -= horizontalSpacing;
 				if(p.autoSize == null) {
 					calcSize(p, c);
 					if(!p.isAbsolute) {
@@ -1401,7 +1401,7 @@ class Flow extends Object {
 			}
 
 			forChildren(function(i, p, c) {
-				autoHeight -= verticalSpacing;
+				if(i > 0) autoHeight -= verticalSpacing;
 				if(p.autoSize == null) {
 					calcSize(p, c);
 					if(!p.isAbsolute) {