{"action":"created","issue":{"url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/662","labels_url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/662/labels{/name}","comments_url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/662/comments","events_url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/662/events","html_url":"https://github.com/PistonDevelopers/conrod/pull/662","id":125537781,"number":662,"title":"Scrolling refactoring and Bug fixes. Add `Axis` enum arg to `Edge::Position` in graph.","user":{"login":"mitchmindtree","id":4587373,"avatar_url":"https://avatars.githubusercontent.com/u/4587373?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchmindtree","html_url":"https://github.com/mitchmindtree","followers_url":"https://api.github.com/users/mitchmindtree/followers","following_url":"https://api.github.com/users/mitchmindtree/following{/other_user}","gists_url":"https://api.github.com/users/mitchmindtree/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchmindtree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchmindtree/subscriptions","organizations_url":"https://api.github.com/users/mitchmindtree/orgs","repos_url":"https://api.github.com/users/mitchmindtree/repos","events_url":"https://api.github.com/users/mitchmindtree/events{/privacy}","received_events_url":"https://api.github.com/users/mitchmindtree/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-08T03:56:41Z","updated_at":"2016-01-09T07:46:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PistonDevelopers/conrod/pulls/662","html_url":"https://github.com/PistonDevelopers/conrod/pull/662","diff_url":"https://github.com/PistonDevelopers/conrod/pull/662.diff","patch_url":"https://github.com/PistonDevelopers/conrod/pull/662.patch"},"body":"~~**WIP - Do not merge yet**~~\r\n\r\nCloses #659.\r\nFixes #660.\r\nCloses #661.\r\n\r\nOk, refactoring complete!\r\n\r\nI'm much happier with these changes, they're much clearer and I can confidently say that I understand the behaviour of each distinct step of the process - not something I can say for the old scrolling setup, which was a little hack-ish and resulted in some hard-to-track-down bugs.\r\n\r\nThis also fixes bugs in the graph logic related to the relative positioning of widgets. Previously, the graph only had a single edge to represent relative positioning across both axes. I've added an `Axis` enum to the `Position` variant, which allows us to track relative positioning uniquely across each axis. This allows for saying cool stuff like `.align_left_of(X).down_from(Y)`, and to know that relative positioning logic will be handled properly when evaluating scroll offsets, etc.\r\n\r\nFinally, scrolling will now also properly consider the `Padding` of the `KidArea` of the widget that has `scroll_kids` enabled. I.e., you can now scroll past the edge of the last widget by the padding amount that is specified for that edge. This is just like how there's a little bit of white padding when you scroll past the widgets at the bottom of this github page."},"comment":{"url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/comments/170206728","html_url":"https://github.com/PistonDevelopers/conrod/pull/662#issuecomment-170206728","issue_url":"https://api.github.com/repos/PistonDevelopers/conrod/issues/662","id":170206728,"user":{"login":"mitchmindtree","id":4587373,"avatar_url":"https://avatars.githubusercontent.com/u/4587373?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchmindtree","html_url":"https://github.com/mitchmindtree","followers_url":"https://api.github.com/users/mitchmindtree/followers","following_url":"https://api.github.com/users/mitchmindtree/following{/other_user}","gists_url":"https://api.github.com/users/mitchmindtree/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchmindtree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchmindtree/subscriptions","organizations_url":"https://api.github.com/users/mitchmindtree/orgs","repos_url":"https://api.github.com/users/mitchmindtree/repos","events_url":"https://api.github.com/users/mitchmindtree/events{/privacy}","received_events_url":"https://api.github.com/users/mitchmindtree/received_events","type":"User","site_admin":false},"created_at":"2016-01-09T07:46:48Z","updated_at":"2016-01-09T07:46:48Z","body":"Just updated the main comment with more thorough details of this refactoring.\r\n\r\nTravis is passing on stable and I've successfully tested the changes with the all_widgets.rs and canvas.rs examples, as well as on two personal projects with much more intricate, nested scrolling behaviour.\r\n\r\nI've published these changes as **0.29.0** - this also includes the changes mentioned in #661 and closes that issue."}}