Incorrect children position with certain alignContent and minHeight / minWidth #1142

Closed
opened 2022-04-15 03:55:58 -07:00 by dkostyrev · 1 comment
dkostyrev commented 2022-04-15 03:55:58 -07:00 (Migrated from github.com)

Report

Issues and Steps to Reproduce

Set up parent node:

  • flexDirection=row
  • minWidth=500, minHeight=200
  • flexWrap=wrap
  • alignContent=flexEnd

Set up 6 child nodes:

  • width=100, height=100

Expected Behavior

Child nodes are displayed inside parent node in two lines.

Actual Behavior

Child nodes are displayed outside of parent node in two lines (child nodes have negative y value).

Link to Code

Playground repro

Expected behaviour

# Report - [x] I have searched [existing issues](https://github.com/facebook/yoga/issues) and this is not a duplicate # Issues and Steps to Reproduce Set up parent node: * `flexDirection=row` * `minWidth=500, minHeight=200` * `flexWrap=wrap` * `alignContent=flexEnd` Set up 6 child nodes: * `width=100, height=100` # Expected Behavior Child nodes are displayed inside parent node in two lines. # Actual Behavior Child nodes are displayed outside of parent node in two lines (child nodes have negative `y` value). # Link to Code [Playground repro](https://yogalayout.com/playground/?eyJ3aWR0aCI6IiIsImhlaWdodCI6IiIsIm1pbldpZHRoIjoiNTAwIiwibWluSGVpZ2h0IjoiMjAwIiwibWF4V2lkdGgiOiIiLCJtYXhIZWlnaHQiOiIiLCJhbGlnbkNvbnRlbnQiOjMsInBvc2l0aW9uIjp7InRvcCI6bnVsbCwicmlnaHQiOm51bGwsImJvdHRvbSI6bnVsbCwibGVmdCI6bnVsbH0sImZsZXhXcmFwIjoxLCJjaGlsZHJlbiI6W3sid2lkdGgiOjEwMCwiaGVpZ2h0IjoxMDAsIm1pbldpZHRoIjpudWxsLCJtaW5IZWlnaHQiOm51bGwsIm1heFdpZHRoIjpudWxsLCJtYXhIZWlnaHQiOm51bGwsInBvc2l0aW9uIjp7InRvcCI6bnVsbCwicmlnaHQiOm51bGwsImJvdHRvbSI6bnVsbCwibGVmdCI6bnVsbH0sImZsZXhTaHJpbmsiOiIwIn0seyJ3aWR0aCI6MTAwLCJoZWlnaHQiOjEwMCwibWluV2lkdGgiOm51bGwsIm1pbkhlaWdodCI6bnVsbCwibWF4V2lkdGgiOm51bGwsIm1heEhlaWdodCI6bnVsbCwicG9zaXRpb24iOnsidG9wIjpudWxsLCJyaWdodCI6bnVsbCwiYm90dG9tIjpudWxsLCJsZWZ0IjpudWxsfSwiZmxleFNocmluayI6IjAifSx7IndpZHRoIjoxMDAsImhlaWdodCI6MTAwLCJtaW5XaWR0aCI6bnVsbCwibWluSGVpZ2h0IjpudWxsLCJtYXhXaWR0aCI6bnVsbCwibWF4SGVpZ2h0IjpudWxsLCJwb3NpdGlvbiI6eyJ0b3AiOm51bGwsInJpZ2h0IjpudWxsLCJib3R0b20iOm51bGwsImxlZnQiOm51bGx9LCJmbGV4U2hyaW5rIjoiMCJ9LHsid2lkdGgiOjEwMCwiaGVpZ2h0IjoxMDAsIm1pbldpZHRoIjpudWxsLCJtaW5IZWlnaHQiOm51bGwsIm1heFdpZHRoIjpudWxsLCJtYXhIZWlnaHQiOm51bGwsInBvc2l0aW9uIjp7InRvcCI6bnVsbCwicmlnaHQiOm51bGwsImJvdHRvbSI6bnVsbCwibGVmdCI6bnVsbH19LHsid2lkdGgiOjEwMCwiaGVpZ2h0IjoxMDAsIm1pbldpZHRoIjpudWxsLCJtaW5IZWlnaHQiOm51bGwsIm1heFdpZHRoIjpudWxsLCJtYXhIZWlnaHQiOm51bGwsInBvc2l0aW9uIjp7InRvcCI6bnVsbCwicmlnaHQiOm51bGwsImJvdHRvbSI6bnVsbCwibGVmdCI6bnVsbH19LHsid2lkdGgiOjEwMCwiaGVpZ2h0IjoxMDAsIm1pbldpZHRoIjpudWxsLCJtaW5IZWlnaHQiOm51bGwsIm1heFdpZHRoIjpudWxsLCJtYXhIZWlnaHQiOm51bGwsInBvc2l0aW9uIjp7InRvcCI6bnVsbCwicmlnaHQiOm51bGwsImJvdHRvbSI6bnVsbCwibGVmdCI6bnVsbH19XX0=) [Expected behaviour](https://jsfiddle.net/p89L51ew/65/)
NickGerleman commented 2024-12-02 23:40:37 -08:00 (Migrated from github.com)
This was fixed in either Yoga 3.0 or Yoga 3.2 https://www.yogalayout.dev/playground?code=DwGQhgng9grgLgAgMZQHYDMCWBzAvAb3xgGcBTAdVICMARU9MGAGzmIC4E4AnGUgXz4A+AFAIEwAHJQAJqVFiExOBCakC+eQoTpVADxqYupJHExoOAIi5QA7hYA0mhTczS4ACw4BWAAw-HWmIAtpioABKkOO5wHABMfgGBOqS65FxgAA6WNukZDk5iYEw4qADCaHCkqDEIFsm6ALRV0vlaAiJakjKkisqq6i5unggAjAkI7pHY0RxjPgIIAPQdCl2yvSpqhIMes+OTUTVzC8tOaz1KmwOuu6P7UzN383xLK2LnG-3bN8Nz9hMPI5+E5vcRSdaXL74Ha-e6HPbPV5ncEXPpbaE-BH-A7TIGI07vRYokTARbgaDwQRAA <img width="1200" alt="image" src="https://github.com/user-attachments/assets/4631882f-de72-4aa6-a3aa-669a7e506a3e">
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DaddyFrosty/yoga#1142
No description provided.