{"action":"closed","issue":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1475","repository_url":"https://api.github.com/repos/facebook/AsyncDisplayKit","labels_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1475/labels{/name}","comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1475/comments","events_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1475/events","html_url":"https://github.com/facebook/AsyncDisplayKit/issues/1475","id":145841998,"number":1475,"title":"[ASTextNode] .flexShrink when contained along with other nodes","user":{"login":"spronin","id":1236794,"avatar_url":"https://avatars.githubusercontent.com/u/1236794?v=3","gravatar_id":"","url":"https://api.github.com/users/spronin","html_url":"https://github.com/spronin","followers_url":"https://api.github.com/users/spronin/followers","following_url":"https://api.github.com/users/spronin/following{/other_user}","gists_url":"https://api.github.com/users/spronin/gists{/gist_id}","starred_url":"https://api.github.com/users/spronin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spronin/subscriptions","organizations_url":"https://api.github.com/users/spronin/orgs","repos_url":"https://api.github.com/users/spronin/repos","events_url":"https://api.github.com/users/spronin/events{/privacy}","received_events_url":"https://api.github.com/users/spronin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/labels/community%20debugging","name":"community debugging","color":"009b95"},{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/labels/discussion","name":"discussion","color":"cc317c"},{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/labels/documentation","name":"documentation","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/milestones/17","html_url":"https://github.com/facebook/AsyncDisplayKit/milestones/1.9.8","labels_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/milestones/17/labels","id":1613535,"number":17,"title":"1.9.8","description":null,"creator":{"login":"appleguy","id":565251,"avatar_url":"https://avatars.githubusercontent.com/u/565251?v=3","gravatar_id":"","url":"https://api.github.com/users/appleguy","html_url":"https://github.com/appleguy","followers_url":"https://api.github.com/users/appleguy/followers","following_url":"https://api.github.com/users/appleguy/following{/other_user}","gists_url":"https://api.github.com/users/appleguy/gists{/gist_id}","starred_url":"https://api.github.com/users/appleguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appleguy/subscriptions","organizations_url":"https://api.github.com/users/appleguy/orgs","repos_url":"https://api.github.com/users/appleguy/repos","events_url":"https://api.github.com/users/appleguy/events{/privacy}","received_events_url":"https://api.github.com/users/appleguy/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":45,"state":"open","created_at":"2016-02-29T22:36:28Z","updated_at":"2016-04-05T03:26:45Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2016-04-05T00:21:49Z","updated_at":"2016-04-05T03:26:46Z","closed_at":"2016-04-05T03:26:45Z","body":"Hello!\r\n\r\nI'm trying to layout multiple nodes and force textnodes to wrap.\r\nIt looks good when there is no much text:\r\n![image](http://spronin.github.io/img/layout_english.jpg)\r\n\r\nHowever, it doesn't wrap when it should (the last one is off-screen):\r\n![image](http://spronin.github.io/img/layout_russian.jpg)\r\n\r\nI have a separate ASDisplayNode subclass that contains all three components.\r\nHere is layout code:\r\n```\r\noverride func layoutSpecThatFits(constrainedSize: ASSizeRange) -> ASLayoutSpec {\r\n    let crowdsourceStack = ASStackLayoutSpec()\r\n    crowdsourceStack.direction = .Horizontal\r\n    crowdsourceStack.justifyContent = .SpaceBetween\r\n    crowdsourceStack.spacingBefore = 4\r\n    crowdsourceStack.spacingAfter = 4\r\n    var crowdsourceChilren = [ASLayoutable]()\r\n    for i in 0..<timeNodes.count {\r\n        let infoStack = ASStackLayoutSpec(direction: .Vertical, spacing: 2, justifyContent: .Center, alignItems: .Start,\r\n                                          children: [timeNodes[i], titleNodes[i]])\r\n        crowdsourceChilren.append(ASStackLayoutSpec(direction: .Horizontal, spacing: 4, justifyContent: .Start, alignItems: .Center,\r\n            children: [progressNodes[i], infoStack]))\r\n    }\r\n    crowdsourceStack.setChildren(crowdsourceChilren)\r\n    return crowdsourceStack\r\n}\r\n```\r\nThen this node is contained inside vertical `ASStackLayoutSpec` with `alignItems = .Stretch`\r\n\r\nI've tried setting `flexShrink = true` to `titleNodes` `infoStack` and its container node but with no luck.\r\n\r\nSo it should look like this:\r\n![image](http://spronin.github.io/img/layout_russian_fixed.jpg)\r\n\r\nI'd be happy to have any suggestions!\r\nThanks in advance."}}