{"action":"created","comment":{"url":"https://api.github.com/repos/Khan/Prototope/pulls/comments/25045230","id":25045230,"diff_hunk":"@@ -66,6 +66,30 @@ extension Layer {\n \t}\n \t\n \t\n+\t/** Moves the receiver so that its left side is aligned with the left side of its parent layer. */\n+\tpublic func moveToLeftSideOfParentLayer(margin: Double = 0.0) {\n+\t\tif let parent = self.parent {\n+\t\t\tself.frameMinX = -margin","path":"Prototope/Layer+Layout.swift","position":7,"original_position":7,"commit_id":"81390de0691556256d8e47b16034c24f340139cf","original_commit_id":"81390de0691556256d8e47b16034c24f340139cf","user":{"login":"jbrennan","id":131923,"avatar_url":"https://avatars.githubusercontent.com/u/131923?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrennan","html_url":"https://github.com/jbrennan","followers_url":"https://api.github.com/users/jbrennan/followers","following_url":"https://api.github.com/users/jbrennan/following{/other_user}","gists_url":"https://api.github.com/users/jbrennan/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrennan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrennan/subscriptions","organizations_url":"https://api.github.com/users/jbrennan/orgs","repos_url":"https://api.github.com/users/jbrennan/repos","events_url":"https://api.github.com/users/jbrennan/events{/privacy}","received_events_url":"https://api.github.com/users/jbrennan/received_events","type":"User","site_admin":false},"body":"Aha. `moveToLeftOfSiblingLayer` is different because it’s with respect to the given `siblingLayer`, whereas `moveToLeftSideOfParentLayer` moves with respect to the `parent` layer.\r\n\r\nIf you have a layer called `parent`, with child layers `child1` and `child2`, `child1.moveToLeftSideOfParentLayer()` will move to be aligned with parent layer’s origin (you can think of this as “stick child to the left side of its parent” where `child1.moveToLeftOfSiblingLayer(child2)` will place `child1` beside `child2` on the left side.\r\n\r\nI’ll grant it’s a bit confusing at first glance and I’m probably blinded by being too used to them :smile: but they’re pretty nice once you get the swing of them.","created_at":"2015-02-20T02:13:58Z","updated_at":"2015-02-20T02:13:58Z","html_url":"https://github.com/Khan/Prototope/pull/27#discussion_r25045230","pull_request_url":"https://api.github.com/repos/Khan/Prototope/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/Khan/Prototope/pulls/comments/25045230"},"html":{"href":"https://github.com/Khan/Prototope/pull/27#discussion_r25045230"},"pull_request":{"href":"https://api.github.com/repos/Khan/Prototope/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/Khan/Prototope/pulls/27","id":29584650,"html_url":"https://github.com/Khan/Prototope/pull/27","diff_url":"https://github.com/Khan/Prototope/pull/27.diff","patch_url":"https://github.com/Khan/Prototope/pull/27.patch","issue_url":"https://api.github.com/repos/Khan/Prototope/issues/27","number":27,"state":"open","locked":false,"title":"[FIN] Layout Bridge Bugfix + Additional Layout Methods","user":{"login":"saniul","id":371773,"avatar_url":"https://avatars.githubusercontent.com/u/371773?v=3","gravatar_id":"","url":"https://api.github.com/users/saniul","html_url":"https://github.com/saniul","followers_url":"https://api.github.com/users/saniul/followers","following_url":"https://api.github.com/users/saniul/following{/other_user}","gists_url":"https://api.github.com/users/saniul/gists{/gist_id}","starred_url":"https://api.github.com/users/saniul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saniul/subscriptions","organizations_url":"https://api.github.com/users/saniul/orgs","repos_url":"https://api.github.com/users/saniul/repos","events_url":"https://api.github.com/users/saniul/events{/privacy}","received_events_url":"https://api.github.com/users/saniul/received_events","type":"User","site_admin":false},"body":"* Fixed LayerBridge.frameMaxY\r\n* Added missing `moveToXXXSideOfParentLayer` methods","created_at":"2015-02-19T03:21:13Z","updated_at":"2015-02-20T02:13:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f67f9b0f0222b24450451aa76d3add5d15d19359","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Khan/Prototope/pulls/27/commits","review_comments_url":"https://api.github.com/repos/Khan/Prototope/pulls/27/comments","review_comment_url":"https://api.github.com/repos/Khan/Prototope/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Khan/Prototope/issues/27/comments","statuses_url":"https://api.github.com/repos/Khan/Prototope/statuses/81390de0691556256d8e47b16034c24f340139cf","head":{"label":"saniul:layout-fixes","ref":"layout-fixes","sha":"81390de0691556256d8e47b16034c24f340139cf","user":{"login":"saniul","id":371773,"avatar_url":"https://avatars.githubusercontent.com/u/371773?v=3","gravatar_id":"","url":"https://api.github.com/users/saniul","html_url":"https://github.com/saniul","followers_url":"https://api.github.com/users/saniul/followers","following_url":"https://api.github.com/users/saniul/following{/other_user}","gists_url":"https://api.github.com/users/saniul/gists{/gist_id}","starred_url":"https://api.github.com/users/saniul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saniul/subscriptions","organizations_url":"https://api.github.com/users/saniul/orgs","repos_url":"https://api.github.com/users/saniul/repos","events_url":"https://api.github.com/users/saniul/events{/privacy}","received_events_url":"https://api.github.com/users/saniul/received_events","type":"User","site_admin":false},"repo":{"id":29907166,"name":"Prototope","full_name":"saniul/Prototope","owner":{"login":"saniul","id":371773,"avatar_url":"https://avatars.githubusercontent.com/u/371773?v=3","gravatar_id":"","url":"https://api.github.com/users/saniul","html_url":"https://github.com/saniul","followers_url":"https://api.github.com/users/saniul/followers","following_url":"https://api.github.com/users/saniul/following{/other_user}","gists_url":"https://api.github.com/users/saniul/gists{/gist_id}","starred_url":"https://api.github.com/users/saniul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saniul/subscriptions","organizations_url":"https://api.github.com/users/saniul/orgs","repos_url":"https://api.github.com/users/saniul/repos","events_url":"https://api.github.com/users/saniul/events{/privacy}","received_events_url":"https://api.github.com/users/saniul/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/saniul/Prototope","description":"Swift library of lightweight interfaces for prototyping","fork":true,"url":"https://api.github.com/repos/saniul/Prototope","forks_url":"https://api.github.com/repos/saniul/Prototope/forks","keys_url":"https://api.github.com/repos/saniul/Prototope/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saniul/Prototope/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saniul/Prototope/teams","hooks_url":"https://api.github.com/repos/saniul/Prototope/hooks","issue_events_url":"https://api.github.com/repos/saniul/Prototope/issues/events{/number}","events_url":"https://api.github.com/repos/saniul/Prototope/events","assignees_url":"https://api.github.com/repos/saniul/Prototope/assignees{/user}","branches_url":"https://api.github.com/repos/saniul/Prototope/branches{/branch}","tags_url":"https://api.github.com/repos/saniul/Prototope/tags","blobs_url":"https://api.github.com/repos/saniul/Prototope/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saniul/Prototope/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saniul/Prototope/git/refs{/sha}","trees_url":"https://api.github.com/repos/saniul/Prototope/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saniul/Prototope/statuses/{sha}","languages_url":"https://api.github.com/repos/saniul/Prototope/languages","stargazers_url":"https://api.github.com/repos/saniul/Prototope/stargazers","contributors_url":"https://api.github.com/repos/saniul/Prototope/contributors","subscribers_url":"https://api.github.com/repos/saniul/Prototope/subscribers","subscription_url":"https://api.github.com/repos/saniul/Prototope/subscription","commits_url":"https://api.github.com/repos/saniul/Prototope/commits{/sha}","git_commits_url":"https://api.github.com/repos/saniul/Prototope/git/commits{/sha}","comments_url":"https://api.github.com/repos/saniul/Prototope/comments{/number}","issue_comment_url":"https://api.github.com/repos/saniul/Prototope/issues/comments/{number}","contents_url":"https://api.github.com/repos/saniul/Prototope/contents/{+path}","compare_url":"https://api.github.com/repos/saniul/Prototope/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saniul/Prototope/merges","archive_url":"https://api.github.com/repos/saniul/Prototope/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saniul/Prototope/downloads","issues_url":"https://api.github.com/repos/saniul/Prototope/issues{/number}","pulls_url":"https://api.github.com/repos/saniul/Prototope/pulls{/number}","milestones_url":"https://api.github.com/repos/saniul/Prototope/milestones{/number}","notifications_url":"https://api.github.com/repos/saniul/Prototope/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saniul/Prototope/labels{/name}","releases_url":"https://api.github.com/repos/saniul/Prototope/releases{/id}","created_at":"2015-01-27T09:36:27Z","updated_at":"2015-02-17T03:26:22Z","pushed_at":"2015-02-19T21:05:25Z","git_url":"git://github.com/saniul/Prototope.git","ssh_url":"git@github.com:saniul/Prototope.git","clone_url":"https://github.com/saniul/Prototope.git","svn_url":"https://github.com/saniul/Prototope","homepage":null,"size":1584,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Khan:master","ref":"master","sha":"7c68df92510392c4a0c5daa54732d20719572a37","user":{"login":"Khan","id":15455,"avatar_url":"https://avatars.githubusercontent.com/u/15455?v=3","gravatar_id":"","url":"https://api.github.com/users/Khan","html_url":"https://github.com/Khan","followers_url":"https://api.github.com/users/Khan/followers","following_url":"https://api.github.com/users/Khan/following{/other_user}","gists_url":"https://api.github.com/users/Khan/gists{/gist_id}","starred_url":"https://api.github.com/users/Khan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Khan/subscriptions","organizations_url":"https://api.github.com/users/Khan/orgs","repos_url":"https://api.github.com/users/Khan/repos","events_url":"https://api.github.com/users/Khan/events{/privacy}","received_events_url":"https://api.github.com/users/Khan/received_events","type":"Organization","site_admin":false},"repo":{"id":24968831,"name":"Prototope","full_name":"Khan/Prototope","owner":{"login":"Khan","id":15455,"avatar_url":"https://avatars.githubusercontent.com/u/15455?v=3","gravatar_id":"","url":"https://api.github.com/users/Khan","html_url":"https://github.com/Khan","followers_url":"https://api.github.com/users/Khan/followers","following_url":"https://api.github.com/users/Khan/following{/other_user}","gists_url":"https://api.github.com/users/Khan/gists{/gist_id}","starred_url":"https://api.github.com/users/Khan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Khan/subscriptions","organizations_url":"https://api.github.com/users/Khan/orgs","repos_url":"https://api.github.com/users/Khan/repos","events_url":"https://api.github.com/users/Khan/events{/privacy}","received_events_url":"https://api.github.com/users/Khan/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Khan/Prototope","description":"Swift library of lightweight interfaces for prototyping, bridged to JS","fork":false,"url":"https://api.github.com/repos/Khan/Prototope","forks_url":"https://api.github.com/repos/Khan/Prototope/forks","keys_url":"https://api.github.com/repos/Khan/Prototope/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Khan/Prototope/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Khan/Prototope/teams","hooks_url":"https://api.github.com/repos/Khan/Prototope/hooks","issue_events_url":"https://api.github.com/repos/Khan/Prototope/issues/events{/number}","events_url":"https://api.github.com/repos/Khan/Prototope/events","assignees_url":"https://api.github.com/repos/Khan/Prototope/assignees{/user}","branches_url":"https://api.github.com/repos/Khan/Prototope/branches{/branch}","tags_url":"https://api.github.com/repos/Khan/Prototope/tags","blobs_url":"https://api.github.com/repos/Khan/Prototope/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Khan/Prototope/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Khan/Prototope/git/refs{/sha}","trees_url":"https://api.github.com/repos/Khan/Prototope/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Khan/Prototope/statuses/{sha}","languages_url":"https://api.github.com/repos/Khan/Prototope/languages","stargazers_url":"https://api.github.com/repos/Khan/Prototope/stargazers","contributors_url":"https://api.github.com/repos/Khan/Prototope/contributors","subscribers_url":"https://api.github.com/repos/Khan/Prototope/subscribers","subscription_url":"https://api.github.com/repos/Khan/Prototope/subscription","commits_url":"https://api.github.com/repos/Khan/Prototope/commits{/sha}","git_commits_url":"https://api.github.com/repos/Khan/Prototope/git/commits{/sha}","comments_url":"https://api.github.com/repos/Khan/Prototope/comments{/number}","issue_comment_url":"https://api.github.com/repos/Khan/Prototope/issues/comments/{number}","contents_url":"https://api.github.com/repos/Khan/Prototope/contents/{+path}","compare_url":"https://api.github.com/repos/Khan/Prototope/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Khan/Prototope/merges","archive_url":"https://api.github.com/repos/Khan/Prototope/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Khan/Prototope/downloads","issues_url":"https://api.github.com/repos/Khan/Prototope/issues{/number}","pulls_url":"https://api.github.com/repos/Khan/Prototope/pulls{/number}","milestones_url":"https://api.github.com/repos/Khan/Prototope/milestones{/number}","notifications_url":"https://api.github.com/repos/Khan/Prototope/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Khan/Prototope/labels{/name}","releases_url":"https://api.github.com/repos/Khan/Prototope/releases{/id}","created_at":"2014-10-09T01:41:46Z","updated_at":"2015-02-19T21:01:09Z","pushed_at":"2015-02-19T21:01:09Z","git_url":"git://github.com/Khan/Prototope.git","ssh_url":"git@github.com:Khan/Prototope.git","clone_url":"https://github.com/Khan/Prototope.git","svn_url":"https://github.com/Khan/Prototope","homepage":"http://khan.github.io/Prototope","size":2861,"stargazers_count":128,"watchers_count":128,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":5,"forks":6,"open_issues":5,"watchers":128,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Khan/Prototope/pulls/27"},"html":{"href":"https://github.com/Khan/Prototope/pull/27"},"issue":{"href":"https://api.github.com/repos/Khan/Prototope/issues/27"},"comments":{"href":"https://api.github.com/repos/Khan/Prototope/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/Khan/Prototope/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/Khan/Prototope/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Khan/Prototope/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/Khan/Prototope/statuses/81390de0691556256d8e47b16034c24f340139cf"}}}}