Skip to content

Commit 4120f37

Browse files
committed
Flow: autoSize now takes minWidth into account
1 parent c411b9f commit 4120f37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

h2d/Flow.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,7 @@ class Flow extends Object {
12271227
if( !p.isAbsolute )
12281228
c.constraintSize(
12291229
isConstraintWidth && p.constraint ? ((p.autoSize != null ? Math.floor(autoWidth * p.autoSize / autoSum) : maxInWidth) - pw) / Math.abs(c.scaleX) : -1,
1230-
isConstraintHeight && p.constraint ? ((p.autoSize != null ? maxLineHeight * p.autoSize : maxInHeight) - ph) / Math.abs(c.scaleY) : -1
1230+
isConstraintHeight && p.constraint ? ((p.autoSize != null ? hxd.Math.imax(maxLineHeight, minLineHeight) * p.autoSize : maxInHeight) - ph) / Math.abs(c.scaleY) : -1
12311231
);
12321232

12331233
var b = getSize(c);
@@ -1389,7 +1389,7 @@ class Flow extends Object {
13891389
var ph = p.paddingTop + p.paddingBottom;
13901390
if( !p.isAbsolute )
13911391
c.constraintSize(
1392-
isConstraintWidth && p.constraint ? ((p.autoSize != null ? maxColWidth * p.autoSize : maxInWidth) - pw) / Math.abs(c.scaleX) : -1,
1392+
isConstraintWidth && p.constraint ? ((p.autoSize != null ? hxd.Math.imax(maxColWidth, minColWidth) * p.autoSize : maxInWidth) - pw) / Math.abs(c.scaleX) : -1,
13931393
isConstraintHeight && p.constraint ? ((p.autoSize != null ? Math.floor(autoHeight * p.autoSize / autoSum) : maxInHeight) - ph) / Math.abs(c.scaleY) : -1
13941394
);
13951395

0 commit comments

Comments
 (0)