GitHub PullRequestReviewCommentEvent at 2014-12-15 15:32:55
Repository: mos-energy-benchmark
Actor: CloudNiner
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/azavea/mos-energy-benchmark/pulls/comments/21832353","id":21832353,"diff_hunk":"@@ -153,8 +153,16 @@\n                 .attr('class', 'x axis')\n                 .attr('transform', 'translate(' + config.margin.left + ',' + (config.plotHeight - config.margin.bottom) + ')');\n \n+            Utils.onPanelSnap(element, function () {\n+                $scope.redraw($scope.data);\n+            });\n+\n             // Overridden ChartingController method\n             $scope.plot = function(data) {\n+                if ($scope.plotComplete || !Utils.inViewPort(element)) {","path":"app/scripts/charting/barchart-directive.js","position":null,"original_position":19,"commit_id":"df072ef101cfaf6700240ee70b74630b274fa77c","original_commit_id":"2f10f9f7d2a06c03340dd25182ffce7dee2c2e85","user":{"login":"CloudNiner","id":1818302,"avatar_url":"https://avatars.githubusercontent.com/u/1818302?v=3","gravatar_id":"","url":"https://api.github.com/users/CloudNiner","html_url":"https://github.com/CloudNiner","followers_url":"https://api.github.com/users/CloudNiner/followers","following_url":"https://api.github.com/users/CloudNiner/following{/other_user}","gists_url":"https://api.github.com/users/CloudNiner/gists{/gist_id}","starred_url":"https://api.github.com/users/CloudNiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CloudNiner/subscriptions","organizations_url":"https://api.github.com/users/CloudNiner/orgs","repos_url":"https://api.github.com/users/CloudNiner/repos","events_url":"https://api.github.com/users/CloudNiner/events{/privacy}","received_events_url":"https://api.github.com/users/CloudNiner/received_events","type":"User","site_admin":false},"body":"So regarding the controller handling dom logic, in this case it seems to be the exception to the rule, since it is a directive specific controller. I've seen the controller used this way in a few 3rd party libraries.\r\n\r\nAlso as you found, you have access to the dependency injected $element object, which is not the case for standard angular controllers AFAIK (but I haven't tried it).","created_at":"2014-12-15T15:32:55Z","updated_at":"2014-12-15T15:32:55Z","html_url":"https://github.com/azavea/mos-energy-benchmark/pull/70#discussion_r21832353","pull_request_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/pulls/70","_links":{"self":{"href":"https://api.github.com/repos/azavea/mos-energy-benchmark/pulls/comments/21832353"},"html":{"href":"https://github.com/azavea/mos-energy-benchmark/pull/70#discussion_r21832353"},"pull_request":{"href":"https://api.github.com/repos/azavea/mos-energy-benchmark/pulls/70"}}},"pull_request":{"url":"https://api.github.com/repos/azavea/mos-energy-benchmark/pulls/70","id":26011649,"html_url":"https://github.com/azavea/mos-energy-benchmark/pull/70","diff_url":"https://github.com/azavea/mos-energy-benchmark/pull/70.diff","patch_url":"https://github.com/azavea/mos-energy-benchmark/pull/70.patch","issue_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/issues/70","number":70,"state":"closed","locked":false,"title":"Animate charts on first viewing","user":{"login":"kshepard","id":6386,"avatar_url":"https://avatars.githubusercontent.com/u/6386?v=3","gravatar_id":"","url":"https://api.github.com/users/kshepard","html_url":"https://github.com/kshepard","followers_url":"https://api.github.com/users/kshepard/followers","following_url":"https://api.github.com/users/kshepard/following{/other_user}","gists_url":"https://api.github.com/users/kshepard/gists{/gist_id}","starred_url":"https://api.github.com/users/kshepard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kshepard/subscriptions","organizations_url":"https://api.github.com/users/kshepard/orgs","repos_url":"https://api.github.com/users/kshepard/repos","events_url":"https://api.github.com/users/kshepard/events{/privacy}","received_events_url":"https://api.github.com/users/kshepard/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-12-12T23:52:37Z","updated_at":"2014-12-15T15:32:55Z","closed_at":"2014-12-15T15:30:58Z","merged_at":"2014-12-15T15:30:58Z","merge_commit_sha":"81605ff4dccc397c623f4b10ac2c19264e0cc318","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/pulls/70/commits","review_comments_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/pulls/70/comments","review_comment_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/pulls/comments/{number}","comments_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/issues/70/comments","statuses_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/statuses/df072ef101cfaf6700240ee70b74630b274fa77c","head":{"label":"azavea:feature/chart-initialization","ref":"feature/chart-initialization","sha":"df072ef101cfaf6700240ee70b74630b274fa77c","user":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"repo":{"id":26913947,"name":"mos-energy-benchmark","full_name":"azavea/mos-energy-benchmark","owner":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/azavea/mos-energy-benchmark","description":"","fork":false,"url":"https://api.github.com/repos/azavea/mos-energy-benchmark","forks_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/forks","keys_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/teams","hooks_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/hooks","issue_events_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/issues/events{/number}","events_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/events","assignees_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/assignees{/user}","branches_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/branches{/branch}","tags_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/tags","blobs_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/git/refs{/sha}","trees_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/statuses/{sha}","languages_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/languages","stargazers_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/stargazers","contributors_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/contributors","subscribers_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/subscribers","subscription_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/subscription","commits_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/commits{/sha}","git_commits_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/git/commits{/sha}","comments_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/comments{/number}","issue_comment_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/issues/comments/{number}","contents_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/contents/{+path}","compare_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/merges","archive_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/downloads","issues_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/issues{/number}","pulls_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/pulls{/number}","milestones_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/milestones{/number}","notifications_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/labels{/name}","releases_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/releases{/id}","created_at":"2014-11-20T13:40:59Z","updated_at":"2014-12-15T15:30:58Z","pushed_at":"2014-12-15T15:30:59Z","git_url":"git://github.com/azavea/mos-energy-benchmark.git","ssh_url":"git@github.com:azavea/mos-energy-benchmark.git","clone_url":"https://github.com/azavea/mos-energy-benchmark.git","svn_url":"https://github.com/azavea/mos-energy-benchmark","homepage":null,"size":3025,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"azavea:develop","ref":"develop","sha":"89c5de7f0537d006b3f7922893e44ca6c5c6e3b0","user":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"repo":{"id":26913947,"name":"mos-energy-benchmark","full_name":"azavea/mos-energy-benchmark","owner":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/azavea/mos-energy-benchmark","description":"","fork":false,"url":"https://api.github.com/repos/azavea/mos-energy-benchmark","forks_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/forks","keys_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/teams","hooks_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/hooks","issue_events_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/issues/events{/number}","events_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/events","assignees_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/assignees{/user}","branches_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/branches{/branch}","tags_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/tags","blobs_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/git/refs{/sha}","trees_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/statuses/{sha}","languages_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/languages","stargazers_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/stargazers","contributors_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/contributors","subscribers_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/subscribers","subscription_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/subscription","commits_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/commits{/sha}","git_commits_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/git/commits{/sha}","comments_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/comments{/number}","issue_comment_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/issues/comments/{number}","contents_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/contents/{+path}","compare_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/merges","archive_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/downloads","issues_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/issues{/number}","pulls_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/pulls{/number}","milestones_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/milestones{/number}","notifications_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/labels{/name}","releases_url":"https://api.github.com/repos/azavea/mos-energy-benchmark/releases{/id}","created_at":"2014-11-20T13:40:59Z","updated_at":"2014-12-15T15:30:58Z","pushed_at":"2014-12-15T15:30:59Z","git_url":"git://github.com/azavea/mos-energy-benchmark.git","ssh_url":"git@github.com:azavea/mos-energy-benchmark.git","clone_url":"https://github.com/azavea/mos-energy-benchmark.git","svn_url":"https://github.com/azavea/mos-energy-benchmark","homepage":null,"size":3025,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/azavea/mos-energy-benchmark/pulls/70"},"html":{"href":"https://github.com/azavea/mos-energy-benchmark/pull/70"},"issue":{"href":"https://api.github.com/repos/azavea/mos-energy-benchmark/issues/70"},"comments":{"href":"https://api.github.com/repos/azavea/mos-energy-benchmark/issues/70/comments"},"review_comments":{"href":"https://api.github.com/repos/azavea/mos-energy-benchmark/pulls/70/comments"},"review_comment":{"href":"https://api.github.com/repos/azavea/mos-energy-benchmark/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/azavea/mos-energy-benchmark/pulls/70/commits"},"statuses":{"href":"https://api.github.com/repos/azavea/mos-energy-benchmark/statuses/df072ef101cfaf6700240ee70b74630b274fa77c"}}}}