{"action":"created","comment":{"url":"https://api.github.com/repos/rehash-app/app/pulls/comments/27275841","id":27275841,"diff_hunk":"@@ -0,0 +1,127 @@\n+'use strict';\n+\n+angular.module('rehash-app')\n+  .directive('scoreboardOverlay', function(\n+    $rootScope,\n+    chatService,\n+    $timeout,\n+    $interval,\n+    $sanitize,\n+    $ionicSideMenuDelegate,\n+    $window) {\n+\n+    return {\n+      'restrict'    : 'E',\n+      'templateUrl' : 'app/components/scoreboard/scoreboardOverlay.html',\n+      'replace'     : true,\n+      'link'        : function(scope, elem, attrs) {\n+\n+        var windowHeight = $window.outerHeight;\n+        var windowWidth = $window.outerWidth;\n+\n+        // DOM manipulation needs to happen inside a $timeout so the digest cycle\n+        // can finish processing ng-repeat items, same applies to $watch listeners.\n+        $timeout(function() {\n+          var flung = false;\n+          var avatars = elem.children();\n+\n+          scope.$watch(function() { return $ionicSideMenuDelegate.$getByHandle('game').getOpenRatio(); },\n+            function (ratio) {\n+              if (ratio === 1) {\n+                flung = true;\n+                $timeout(function() {\n+                  angular.forEach(avatars, function(avatar) {\n+                    var xFling = windowWidth + 50;\n+                    var yFling = Math.floor(Math.random() * 200) - 100;\n+                    angular.element(avatar)\n+                      .css('transform', 'translateX(' + xFling + 'px) translateY(' + yFling + 'px) rotate(180deg)');\n+                  });\n+                }, 25);\n+              } else if (ratio <= 0 && flung === true) {\n+                angular.forEach(avatars, function(avatar) {\n+\n+                  // @TODO - Patrick: This wont fly when the scoreboard needs to rearrange itself\n+                  // since translateY will need to be used to order the icons\n+                  angular.element(avatar).attr('style', '');\n+                });\n+              }\n+            }\n+          );\n+        });\n+\n+        //$interval(function() {","path":"client/app/components/scoreboard/scoreboardOverlay.directive.js","position":52,"original_position":52,"commit_id":"4fcc13e160f4cac4611ea882fb2acde3b26656de","original_commit_id":"4fcc13e160f4cac4611ea882fb2acde3b26656de","user":{"login":"pcostanz","id":2976552,"avatar_url":"https://avatars.githubusercontent.com/u/2976552?v=3","gravatar_id":"","url":"https://api.github.com/users/pcostanz","html_url":"https://github.com/pcostanz","followers_url":"https://api.github.com/users/pcostanz/followers","following_url":"https://api.github.com/users/pcostanz/following{/other_user}","gists_url":"https://api.github.com/users/pcostanz/gists{/gist_id}","starred_url":"https://api.github.com/users/pcostanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcostanz/subscriptions","organizations_url":"https://api.github.com/users/pcostanz/orgs","repos_url":"https://api.github.com/users/pcostanz/repos","events_url":"https://api.github.com/users/pcostanz/events{/privacy}","received_events_url":"https://api.github.com/users/pcostanz/received_events","type":"User","site_admin":false},"body":"was using this to visually test the interface, how no idea how to actually write tests for interface animation. try looking this up","created_at":"2015-03-27T04:48:49Z","updated_at":"2015-03-27T04:48:49Z","html_url":"https://github.com/rehash-app/app/pull/22#discussion_r27275841","pull_request_url":"https://api.github.com/repos/rehash-app/app/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/rehash-app/app/pulls/comments/27275841"},"html":{"href":"https://github.com/rehash-app/app/pull/22#discussion_r27275841"},"pull_request":{"href":"https://api.github.com/repos/rehash-app/app/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/rehash-app/app/pulls/22","id":32022757,"html_url":"https://github.com/rehash-app/app/pull/22","diff_url":"https://github.com/rehash-app/app/pull/22.diff","patch_url":"https://github.com/rehash-app/app/pull/22.patch","issue_url":"https://api.github.com/repos/rehash-app/app/issues/22","number":22,"state":"open","locked":false,"title":"scoreboard work in progress - NOT ready for merge","user":{"login":"pcostanz","id":2976552,"avatar_url":"https://avatars.githubusercontent.com/u/2976552?v=3","gravatar_id":"","url":"https://api.github.com/users/pcostanz","html_url":"https://github.com/pcostanz","followers_url":"https://api.github.com/users/pcostanz/followers","following_url":"https://api.github.com/users/pcostanz/following{/other_user}","gists_url":"https://api.github.com/users/pcostanz/gists{/gist_id}","starred_url":"https://api.github.com/users/pcostanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcostanz/subscriptions","organizations_url":"https://api.github.com/users/pcostanz/orgs","repos_url":"https://api.github.com/users/pcostanz/repos","events_url":"https://api.github.com/users/pcostanz/events{/privacy}","received_events_url":"https://api.github.com/users/pcostanz/received_events","type":"User","site_admin":false},"body":"opening PR so i can comment on some cleanup i need to do","created_at":"2015-03-26T14:34:41Z","updated_at":"2015-03-27T04:48:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05ba07d4f7fad87aed2ce1d70483f59ac91d1377","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rehash-app/app/pulls/22/commits","review_comments_url":"https://api.github.com/repos/rehash-app/app/pulls/22/comments","review_comment_url":"https://api.github.com/repos/rehash-app/app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rehash-app/app/issues/22/comments","statuses_url":"https://api.github.com/repos/rehash-app/app/statuses/4fcc13e160f4cac4611ea882fb2acde3b26656de","head":{"label":"pcostanz:scoreboard","ref":"scoreboard","sha":"4fcc13e160f4cac4611ea882fb2acde3b26656de","user":{"login":"pcostanz","id":2976552,"avatar_url":"https://avatars.githubusercontent.com/u/2976552?v=3","gravatar_id":"","url":"https://api.github.com/users/pcostanz","html_url":"https://github.com/pcostanz","followers_url":"https://api.github.com/users/pcostanz/followers","following_url":"https://api.github.com/users/pcostanz/following{/other_user}","gists_url":"https://api.github.com/users/pcostanz/gists{/gist_id}","starred_url":"https://api.github.com/users/pcostanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcostanz/subscriptions","organizations_url":"https://api.github.com/users/pcostanz/orgs","repos_url":"https://api.github.com/users/pcostanz/repos","events_url":"https://api.github.com/users/pcostanz/events{/privacy}","received_events_url":"https://api.github.com/users/pcostanz/received_events","type":"User","site_admin":false},"repo":{"id":32438133,"name":"app","full_name":"pcostanz/app","owner":{"login":"pcostanz","id":2976552,"avatar_url":"https://avatars.githubusercontent.com/u/2976552?v=3","gravatar_id":"","url":"https://api.github.com/users/pcostanz","html_url":"https://github.com/pcostanz","followers_url":"https://api.github.com/users/pcostanz/followers","following_url":"https://api.github.com/users/pcostanz/following{/other_user}","gists_url":"https://api.github.com/users/pcostanz/gists{/gist_id}","starred_url":"https://api.github.com/users/pcostanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcostanz/subscriptions","organizations_url":"https://api.github.com/users/pcostanz/orgs","repos_url":"https://api.github.com/users/pcostanz/repos","events_url":"https://api.github.com/users/pcostanz/events{/privacy}","received_events_url":"https://api.github.com/users/pcostanz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pcostanz/app","description":"Rehash App","fork":true,"url":"https://api.github.com/repos/pcostanz/app","forks_url":"https://api.github.com/repos/pcostanz/app/forks","keys_url":"https://api.github.com/repos/pcostanz/app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pcostanz/app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pcostanz/app/teams","hooks_url":"https://api.github.com/repos/pcostanz/app/hooks","issue_events_url":"https://api.github.com/repos/pcostanz/app/issues/events{/number}","events_url":"https://api.github.com/repos/pcostanz/app/events","assignees_url":"https://api.github.com/repos/pcostanz/app/assignees{/user}","branches_url":"https://api.github.com/repos/pcostanz/app/branches{/branch}","tags_url":"https://api.github.com/repos/pcostanz/app/tags","blobs_url":"https://api.github.com/repos/pcostanz/app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pcostanz/app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pcostanz/app/git/refs{/sha}","trees_url":"https://api.github.com/repos/pcostanz/app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pcostanz/app/statuses/{sha}","languages_url":"https://api.github.com/repos/pcostanz/app/languages","stargazers_url":"https://api.github.com/repos/pcostanz/app/stargazers","contributors_url":"https://api.github.com/repos/pcostanz/app/contributors","subscribers_url":"https://api.github.com/repos/pcostanz/app/subscribers","subscription_url":"https://api.github.com/repos/pcostanz/app/subscription","commits_url":"https://api.github.com/repos/pcostanz/app/commits{/sha}","git_commits_url":"https://api.github.com/repos/pcostanz/app/git/commits{/sha}","comments_url":"https://api.github.com/repos/pcostanz/app/comments{/number}","issue_comment_url":"https://api.github.com/repos/pcostanz/app/issues/comments{/number}","contents_url":"https://api.github.com/repos/pcostanz/app/contents/{+path}","compare_url":"https://api.github.com/repos/pcostanz/app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pcostanz/app/merges","archive_url":"https://api.github.com/repos/pcostanz/app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pcostanz/app/downloads","issues_url":"https://api.github.com/repos/pcostanz/app/issues{/number}","pulls_url":"https://api.github.com/repos/pcostanz/app/pulls{/number}","milestones_url":"https://api.github.com/repos/pcostanz/app/milestones{/number}","notifications_url":"https://api.github.com/repos/pcostanz/app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pcostanz/app/labels{/name}","releases_url":"https://api.github.com/repos/pcostanz/app/releases{/id}","created_at":"2015-03-18T04:36:54Z","updated_at":"2015-03-26T03:08:19Z","pushed_at":"2015-03-26T14:33:13Z","git_url":"git://github.com/pcostanz/app.git","ssh_url":"git@github.com:pcostanz/app.git","clone_url":"https://github.com/pcostanz/app.git","svn_url":"https://github.com/pcostanz/app","homepage":"","size":2441,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"rehash-app:master","ref":"master","sha":"6397dd9bf73215a601fedaea7ac1c44e8f39413f","user":{"login":"rehash-app","id":11496653,"avatar_url":"https://avatars.githubusercontent.com/u/11496653?v=3","gravatar_id":"","url":"https://api.github.com/users/rehash-app","html_url":"https://github.com/rehash-app","followers_url":"https://api.github.com/users/rehash-app/followers","following_url":"https://api.github.com/users/rehash-app/following{/other_user}","gists_url":"https://api.github.com/users/rehash-app/gists{/gist_id}","starred_url":"https://api.github.com/users/rehash-app/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rehash-app/subscriptions","organizations_url":"https://api.github.com/users/rehash-app/orgs","repos_url":"https://api.github.com/users/rehash-app/repos","events_url":"https://api.github.com/users/rehash-app/events{/privacy}","received_events_url":"https://api.github.com/users/rehash-app/received_events","type":"Organization","site_admin":false},"repo":{"id":32381019,"name":"app","full_name":"rehash-app/app","owner":{"login":"rehash-app","id":11496653,"avatar_url":"https://avatars.githubusercontent.com/u/11496653?v=3","gravatar_id":"","url":"https://api.github.com/users/rehash-app","html_url":"https://github.com/rehash-app","followers_url":"https://api.github.com/users/rehash-app/followers","following_url":"https://api.github.com/users/rehash-app/following{/other_user}","gists_url":"https://api.github.com/users/rehash-app/gists{/gist_id}","starred_url":"https://api.github.com/users/rehash-app/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rehash-app/subscriptions","organizations_url":"https://api.github.com/users/rehash-app/orgs","repos_url":"https://api.github.com/users/rehash-app/repos","events_url":"https://api.github.com/users/rehash-app/events{/privacy}","received_events_url":"https://api.github.com/users/rehash-app/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rehash-app/app","description":"Rehash App","fork":false,"url":"https://api.github.com/repos/rehash-app/app","forks_url":"https://api.github.com/repos/rehash-app/app/forks","keys_url":"https://api.github.com/repos/rehash-app/app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rehash-app/app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rehash-app/app/teams","hooks_url":"https://api.github.com/repos/rehash-app/app/hooks","issue_events_url":"https://api.github.com/repos/rehash-app/app/issues/events{/number}","events_url":"https://api.github.com/repos/rehash-app/app/events","assignees_url":"https://api.github.com/repos/rehash-app/app/assignees{/user}","branches_url":"https://api.github.com/repos/rehash-app/app/branches{/branch}","tags_url":"https://api.github.com/repos/rehash-app/app/tags","blobs_url":"https://api.github.com/repos/rehash-app/app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rehash-app/app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rehash-app/app/git/refs{/sha}","trees_url":"https://api.github.com/repos/rehash-app/app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rehash-app/app/statuses/{sha}","languages_url":"https://api.github.com/repos/rehash-app/app/languages","stargazers_url":"https://api.github.com/repos/rehash-app/app/stargazers","contributors_url":"https://api.github.com/repos/rehash-app/app/contributors","subscribers_url":"https://api.github.com/repos/rehash-app/app/subscribers","subscription_url":"https://api.github.com/repos/rehash-app/app/subscription","commits_url":"https://api.github.com/repos/rehash-app/app/commits{/sha}","git_commits_url":"https://api.github.com/repos/rehash-app/app/git/commits{/sha}","comments_url":"https://api.github.com/repos/rehash-app/app/comments{/number}","issue_comment_url":"https://api.github.com/repos/rehash-app/app/issues/comments{/number}","contents_url":"https://api.github.com/repos/rehash-app/app/contents/{+path}","compare_url":"https://api.github.com/repos/rehash-app/app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rehash-app/app/merges","archive_url":"https://api.github.com/repos/rehash-app/app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rehash-app/app/downloads","issues_url":"https://api.github.com/repos/rehash-app/app/issues{/number}","pulls_url":"https://api.github.com/repos/rehash-app/app/pulls{/number}","milestones_url":"https://api.github.com/repos/rehash-app/app/milestones{/number}","notifications_url":"https://api.github.com/repos/rehash-app/app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rehash-app/app/labels{/name}","releases_url":"https://api.github.com/repos/rehash-app/app/releases{/id}","created_at":"2015-03-17T08:37:12Z","updated_at":"2015-03-25T23:38:07Z","pushed_at":"2015-03-26T14:34:41Z","git_url":"git://github.com/rehash-app/app.git","ssh_url":"git@github.com:rehash-app/app.git","clone_url":"https://github.com/rehash-app/app.git","svn_url":"https://github.com/rehash-app/app","homepage":"http://getrehash.com","size":2602,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":7,"forks":4,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rehash-app/app/pulls/22"},"html":{"href":"https://github.com/rehash-app/app/pull/22"},"issue":{"href":"https://api.github.com/repos/rehash-app/app/issues/22"},"comments":{"href":"https://api.github.com/repos/rehash-app/app/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/rehash-app/app/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/rehash-app/app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rehash-app/app/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/rehash-app/app/statuses/4fcc13e160f4cac4611ea882fb2acde3b26656de"}}}}