You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suspect this issue is similar to #901, but can't be sure
The text was updated successfully, but these errors were encountered:
hanleylee
changed the title
top position is wrong when previous item's height is float value, on 3x scale screen
top position is wrong when previous item's height is 0.5, on 3x scale screen
Dec 19, 2023
Yoga assumes every leaf node is YGNodeTypeText, which triggers ceil instead of round. This assumption is not correct when measure function is used to delegate to different layout system.
Report
Issues and Steps to Reproduce
Anyone can reproduce it using below code(YogaKit (for iOS) 2.0.1)
Expected Behavior
The top position of
view3
is 50.667 instead of 50.333, because the heights ofview1
andview2
are 50, 0.667 respectivelyActual Behavior
The top position of view3 is 50.333
Screenshot
Explore
After check the source code, I found here will convert
view3
's top from50.5
to50.333
, while textRounding istrue
.yoga/yoga/algorithm/PixelGrid.cpp
Lines 84 to 94 in 7697be5
Other
I suspect this issue is similar to #901, but can't be sure
The text was updated successfully, but these errors were encountered: