We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a91b1a0 + ed58f5c commit 456523eCopy full SHA for 456523e
Sources/YogaKit/YGLayout.mm
@@ -309,11 +309,15 @@ - (void)applyLayoutPreservingOrigin:(BOOL)preserveOrigin dimensionFlexibility:(Y
309
310
- (CGSize)intrinsicSize
311
{
312
- const CGSize constrainedSize = {
+ CGSize constrainedSize = {
313
.width = YGUndefined,
314
.height = YGUndefined,
315
};
316
- return [self calculateLayoutWithSize:constrainedSize];
+ constrainedSize = [self calculateLayoutWithSize:constrainedSize];
317
+ return (CGSize){
318
+ .width = YGRoundPixelValue(constrainedSize.width),
319
+ .height = YGRoundPixelValue(constrainedSize.height),
320
+ };
321
}
322
323
- (CGSize)calculateLayoutWithSize:(CGSize)size
0 commit comments