{"action":"created","issue":{"url":"https://api.github.com/repos/infinitered/rmq/issues/166","labels_url":"https://api.github.com/repos/infinitered/rmq/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/infinitered/rmq/issues/166/comments","events_url":"https://api.github.com/repos/infinitered/rmq/issues/166/events","html_url":"https://github.com/infinitered/rmq/issues/166","id":53556351,"number":166,"title":"distribute(:horizontal, alignment: :centered)","user":{"login":"twerth","id":8499,"avatar_url":"https://avatars.githubusercontent.com/u/8499?v=3","gravatar_id":"","url":"https://api.github.com/users/twerth","html_url":"https://github.com/twerth","followers_url":"https://api.github.com/users/twerth/followers","following_url":"https://api.github.com/users/twerth/following{/other_user}","gists_url":"https://api.github.com/users/twerth/gists{/gist_id}","starred_url":"https://api.github.com/users/twerth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twerth/subscriptions","organizations_url":"https://api.github.com/users/twerth/orgs","repos_url":"https://api.github.com/users/twerth/repos","events_url":"https://api.github.com/users/twerth/events{/privacy}","received_events_url":"https://api.github.com/users/twerth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/infinitered/rmq/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-01-06T20:02:19Z","updated_at":"2015-03-02T16:12:43Z","closed_at":null,"body":"@markrickert and I were discussing this.\r\n\r\nSo layout has `centered: :horizontal` and such, but if you apply a layout to a set of views, it will get applied to each individually. But sometimes you want to apply something like that to a group of views. Dealing with groups is what `distribute` is good at. So the idea is to add some new params to `distribute` to handle this.\r\n\r\nPerhaps this is overloading `distribute` too much and we should make a `group_layout` instead.\r\n\r\nSomething like this:\r\n\r\n```\r\n[   [a]      [     b     ]                [c] ]\r\n```\r\n\r\nThen this\r\n```ruby\r\nrmq(a,b,c).distribute(:horizontal, margin: 5, alignment: :centered)\r\n```\r\nDoes this\r\n```\r\n[            [a] [     b     ] [c]           ]\r\n```\r\n\r\nOr this\r\n```ruby\r\nrmq(a,b,c).distribute(:horizontal, margin: 5, alignment: :right)\r\n```\r\nDoes this\r\n```\r\n[                    [a] [     b     ] [c] ]\r\n```\r\n\r\n^ in this case, does a 5 margin get applied between [c] and the parent's right?"},"comment":{"url":"https://api.github.com/repos/infinitered/rmq/issues/comments/76740914","html_url":"https://github.com/infinitered/rmq/issues/166#issuecomment-76740914","issue_url":"https://api.github.com/repos/infinitered/rmq/issues/166","id":76740914,"user":{"login":"markrickert","id":139261,"avatar_url":"https://avatars.githubusercontent.com/u/139261?v=3","gravatar_id":"","url":"https://api.github.com/users/markrickert","html_url":"https://github.com/markrickert","followers_url":"https://api.github.com/users/markrickert/followers","following_url":"https://api.github.com/users/markrickert/following{/other_user}","gists_url":"https://api.github.com/users/markrickert/gists{/gist_id}","starred_url":"https://api.github.com/users/markrickert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markrickert/subscriptions","organizations_url":"https://api.github.com/users/markrickert/orgs","repos_url":"https://api.github.com/users/markrickert/repos","events_url":"https://api.github.com/users/markrickert/events{/privacy}","received_events_url":"https://api.github.com/users/markrickert/received_events","type":"User","site_admin":false},"created_at":"2015-03-02T16:12:43Z","updated_at":"2015-03-02T16:12:43Z","body":"I guess the workflow would be to add everything to the UIView and then `resize_frame_to_fit_subviews` and then center the view, huh?"}}