Skip to content

Commit ddf9573

Browse files
committed
Don't truncate UIView provided size to integers
1 parent 3677ce1 commit ddf9573

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/YogaKit/YGLayout.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ static YGSize YGMeasureView(
337337
}];
338338

339339
return (YGSize) {
340-
.width = (YGUnit) YGSanitizeMeasurement(constrainedWidth, sizeThatFits.width, widthMode),
341-
.height = (YGUnit) YGSanitizeMeasurement(constrainedHeight, sizeThatFits.height, heightMode),
340+
.width = (float) YGSanitizeMeasurement(constrainedWidth, sizeThatFits.width, widthMode),
341+
.height = (float) YGSanitizeMeasurement(constrainedHeight, sizeThatFits.height, heightMode),
342342
};
343343
}
344344

0 commit comments

Comments
 (0)