Bläddra i källkod

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

trethaller 2 år sedan
förälder
incheckning
90c27d249f
1 ändrade filer med 2 tillägg och 2 borttagningar
  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) {