{"action":"created","comment":{"url":"https://api.github.com/repos/nens/lizard-client/pulls/comments/91941899","pull_request_review_id":12450455,"id":91941899,"diff_hunk":"@@ -24,43 +31,70 @@ angular.module('dashboard')\n    *   }]\n    * }\n    *\n+   * NOTE: this is a temporary solution. We should do something different with a\n+   * list of graphs on the state. A synchronous build of the dashboard into\n+   * items which fill themselves with asynchronous data.\n+   *\n    * @param  {array} graphs     Currently plotted graphs.\n    * @param  {array} timeseries Data source timeseries from timseriesService.\n    * @param  {array} assets     Data source DataService.assets.\n    * @param  {array} geometries Data source DataService.geometries.\n+   * @param  {array} selections State.selections.\n    * @return {array} graph\n    */\n-  this.buildGraphs = function (graphs, timeseries, assets, geometries) {\n+  this.buildGraphs = function (graphs, timeseries, assets, geometries,\n+                               selections) {\n \n     graphs = this._setAllContentToNotUpdated(graphs);\n \n+  /**\n+   * Checks if a selectable data item is in selections.\n+   *\n+   * @param  {array} selectiontype  timeseries, geom, asset, ... etc.\n+   * @param  {array} selectionId    Data source timeseries from timseriesService.\n+   * @param  {array} rasterId       Data source DataService.assets.\n+   * @return {boolean}              whether data item is in selections\n+   */\n+    var selected = _.curry(function(selectiontype, selectionId, rasterId) {\n+      return _.find(selections, function(selection){\n+        return selection[selectiontype] === selectionId &&\n+          selection.raster === rasterId;","path":"app/components/dashboard/dashboard-service.js","position":46,"original_position":46,"commit_id":"f51fdf51867c16f4f21620da5dd2a174bfa2f7cc","original_commit_id":"53bef87f4978534f2fb13889814658afc8b55281","user":{"login":"RoelvandenBerg","id":10162961,"avatar_url":"https://avatars.githubusercontent.com/u/10162961?v=3","gravatar_id":"","url":"https://api.github.com/users/RoelvandenBerg","html_url":"https://github.com/RoelvandenBerg","followers_url":"https://api.github.com/users/RoelvandenBerg/followers","following_url":"https://api.github.com/users/RoelvandenBerg/following{/other_user}","gists_url":"https://api.github.com/users/RoelvandenBerg/gists{/gist_id}","starred_url":"https://api.github.com/users/RoelvandenBerg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoelvandenBerg/subscriptions","organizations_url":"https://api.github.com/users/RoelvandenBerg/orgs","repos_url":"https://api.github.com/users/RoelvandenBerg/repos","events_url":"https://api.github.com/users/RoelvandenBerg/events{/privacy}","received_events_url":"https://api.github.com/users/RoelvandenBerg/received_events","type":"User","site_admin":false},"body":"Yes, so then the check will be undefined === undefined. I changed the function to a function that returns a function. ","created_at":"2016-12-12T13:02:23Z","updated_at":"2016-12-12T13:02:23Z","html_url":"https://github.com/nens/lizard-client/pull/750#discussion_r91941899","pull_request_url":"https://api.github.com/repos/nens/lizard-client/pulls/750","_links":{"self":{"href":"https://api.github.com/repos/nens/lizard-client/pulls/comments/91941899"},"html":{"href":"https://github.com/nens/lizard-client/pull/750#discussion_r91941899"},"pull_request":{"href":"https://api.github.com/repos/nens/lizard-client/pulls/750"}}},"pull_request":{"url":"https://api.github.com/repos/nens/lizard-client/pulls/750","id":93193446,"html_url":"https://github.com/nens/lizard-client/pull/750","diff_url":"https://github.com/nens/lizard-client/pull/750.diff","patch_url":"https://github.com/nens/lizard-client/pull/750.patch","issue_url":"https://api.github.com/repos/nens/lizard-client/issues/750","number":750,"state":"open","locked":false,"title":"[WIP] Roel improve selected geom state","user":{"login":"RoelvandenBerg","id":10162961,"avatar_url":"https://avatars.githubusercontent.com/u/10162961?v=3","gravatar_id":"","url":"https://api.github.com/users/RoelvandenBerg","html_url":"https://github.com/RoelvandenBerg","followers_url":"https://api.github.com/users/RoelvandenBerg/followers","following_url":"https://api.github.com/users/RoelvandenBerg/following{/other_user}","gists_url":"https://api.github.com/users/RoelvandenBerg/gists{/gist_id}","starred_url":"https://api.github.com/users/RoelvandenBerg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoelvandenBerg/subscriptions","organizations_url":"https://api.github.com/users/RoelvandenBerg/orgs","repos_url":"https://api.github.com/users/RoelvandenBerg/repos","events_url":"https://api.github.com/users/RoelvandenBerg/events{/privacy}","received_events_url":"https://api.github.com/users/RoelvandenBerg/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-10T17:18:51Z","updated_at":"2016-12-12T13:02:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4963bef3034cd6bfdab47e10f16a22b9286a7fb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nens/lizard-client/pulls/750/commits","review_comments_url":"https://api.github.com/repos/nens/lizard-client/pulls/750/comments","review_comment_url":"https://api.github.com/repos/nens/lizard-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nens/lizard-client/issues/750/comments","statuses_url":"https://api.github.com/repos/nens/lizard-client/statuses/f51fdf51867c16f4f21620da5dd2a174bfa2f7cc","head":{"label":"nens:roel-improve_selected_geom_state","ref":"roel-improve_selected_geom_state","sha":"f51fdf51867c16f4f21620da5dd2a174bfa2f7cc","user":{"login":"nens","id":826981,"avatar_url":"https://avatars.githubusercontent.com/u/826981?v=3","gravatar_id":"","url":"https://api.github.com/users/nens","html_url":"https://github.com/nens","followers_url":"https://api.github.com/users/nens/followers","following_url":"https://api.github.com/users/nens/following{/other_user}","gists_url":"https://api.github.com/users/nens/gists{/gist_id}","starred_url":"https://api.github.com/users/nens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nens/subscriptions","organizations_url":"https://api.github.com/users/nens/orgs","repos_url":"https://api.github.com/users/nens/repos","events_url":"https://api.github.com/users/nens/events{/privacy}","received_events_url":"https://api.github.com/users/nens/received_events","type":"Organization","site_admin":false},"repo":{"id":19860085,"name":"lizard-client","full_name":"nens/lizard-client","owner":{"login":"nens","id":826981,"avatar_url":"https://avatars.githubusercontent.com/u/826981?v=3","gravatar_id":"","url":"https://api.github.com/users/nens","html_url":"https://github.com/nens","followers_url":"https://api.github.com/users/nens/followers","following_url":"https://api.github.com/users/nens/following{/other_user}","gists_url":"https://api.github.com/users/nens/gists{/gist_id}","starred_url":"https://api.github.com/users/nens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nens/subscriptions","organizations_url":"https://api.github.com/users/nens/orgs","repos_url":"https://api.github.com/users/nens/repos","events_url":"https://api.github.com/users/nens/events{/privacy}","received_events_url":"https://api.github.com/users/nens/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nens/lizard-client","description":"Front end to lizard-nxt.","fork":false,"url":"https://api.github.com/repos/nens/lizard-client","forks_url":"https://api.github.com/repos/nens/lizard-client/forks","keys_url":"https://api.github.com/repos/nens/lizard-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nens/lizard-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nens/lizard-client/teams","hooks_url":"https://api.github.com/repos/nens/lizard-client/hooks","issue_events_url":"https://api.github.com/repos/nens/lizard-client/issues/events{/number}","events_url":"https://api.github.com/repos/nens/lizard-client/events","assignees_url":"https://api.github.com/repos/nens/lizard-client/assignees{/user}","branches_url":"https://api.github.com/repos/nens/lizard-client/branches{/branch}","tags_url":"https://api.github.com/repos/nens/lizard-client/tags","blobs_url":"https://api.github.com/repos/nens/lizard-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nens/lizard-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nens/lizard-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/nens/lizard-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nens/lizard-client/statuses/{sha}","languages_url":"https://api.github.com/repos/nens/lizard-client/languages","stargazers_url":"https://api.github.com/repos/nens/lizard-client/stargazers","contributors_url":"https://api.github.com/repos/nens/lizard-client/contributors","subscribers_url":"https://api.github.com/repos/nens/lizard-client/subscribers","subscription_url":"https://api.github.com/repos/nens/lizard-client/subscription","commits_url":"https://api.github.com/repos/nens/lizard-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/nens/lizard-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/nens/lizard-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/nens/lizard-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/nens/lizard-client/contents/{+path}","compare_url":"https://api.github.com/repos/nens/lizard-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nens/lizard-client/merges","archive_url":"https://api.github.com/repos/nens/lizard-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nens/lizard-client/downloads","issues_url":"https://api.github.com/repos/nens/lizard-client/issues{/number}","pulls_url":"https://api.github.com/repos/nens/lizard-client/pulls{/number}","milestones_url":"https://api.github.com/repos/nens/lizard-client/milestones{/number}","notifications_url":"https://api.github.com/repos/nens/lizard-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nens/lizard-client/labels{/name}","releases_url":"https://api.github.com/repos/nens/lizard-client/releases{/id}","deployments_url":"https://api.github.com/repos/nens/lizard-client/deployments","created_at":"2014-05-16T14:50:33Z","updated_at":"2016-12-08T09:01:03Z","pushed_at":"2016-12-12T12:23:50Z","git_url":"git://github.com/nens/lizard-client.git","ssh_url":"git@github.com:nens/lizard-client.git","clone_url":"https://github.com/nens/lizard-client.git","svn_url":"https://github.com/nens/lizard-client","homepage":"https://lizard.net","size":18361,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":3,"default_branch":"master"}},"base":{"label":"nens:master","ref":"master","sha":"44d1f052d90b63a8c8e7d4826a7d763a83b9098c","user":{"login":"nens","id":826981,"avatar_url":"https://avatars.githubusercontent.com/u/826981?v=3","gravatar_id":"","url":"https://api.github.com/users/nens","html_url":"https://github.com/nens","followers_url":"https://api.github.com/users/nens/followers","following_url":"https://api.github.com/users/nens/following{/other_user}","gists_url":"https://api.github.com/users/nens/gists{/gist_id}","starred_url":"https://api.github.com/users/nens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nens/subscriptions","organizations_url":"https://api.github.com/users/nens/orgs","repos_url":"https://api.github.com/users/nens/repos","events_url":"https://api.github.com/users/nens/events{/privacy}","received_events_url":"https://api.github.com/users/nens/received_events","type":"Organization","site_admin":false},"repo":{"id":19860085,"name":"lizard-client","full_name":"nens/lizard-client","owner":{"login":"nens","id":826981,"avatar_url":"https://avatars.githubusercontent.com/u/826981?v=3","gravatar_id":"","url":"https://api.github.com/users/nens","html_url":"https://github.com/nens","followers_url":"https://api.github.com/users/nens/followers","following_url":"https://api.github.com/users/nens/following{/other_user}","gists_url":"https://api.github.com/users/nens/gists{/gist_id}","starred_url":"https://api.github.com/users/nens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nens/subscriptions","organizations_url":"https://api.github.com/users/nens/orgs","repos_url":"https://api.github.com/users/nens/repos","events_url":"https://api.github.com/users/nens/events{/privacy}","received_events_url":"https://api.github.com/users/nens/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nens/lizard-client","description":"Front end to lizard-nxt.","fork":false,"url":"https://api.github.com/repos/nens/lizard-client","forks_url":"https://api.github.com/repos/nens/lizard-client/forks","keys_url":"https://api.github.com/repos/nens/lizard-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nens/lizard-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nens/lizard-client/teams","hooks_url":"https://api.github.com/repos/nens/lizard-client/hooks","issue_events_url":"https://api.github.com/repos/nens/lizard-client/issues/events{/number}","events_url":"https://api.github.com/repos/nens/lizard-client/events","assignees_url":"https://api.github.com/repos/nens/lizard-client/assignees{/user}","branches_url":"https://api.github.com/repos/nens/lizard-client/branches{/branch}","tags_url":"https://api.github.com/repos/nens/lizard-client/tags","blobs_url":"https://api.github.com/repos/nens/lizard-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nens/lizard-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nens/lizard-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/nens/lizard-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nens/lizard-client/statuses/{sha}","languages_url":"https://api.github.com/repos/nens/lizard-client/languages","stargazers_url":"https://api.github.com/repos/nens/lizard-client/stargazers","contributors_url":"https://api.github.com/repos/nens/lizard-client/contributors","subscribers_url":"https://api.github.com/repos/nens/lizard-client/subscribers","subscription_url":"https://api.github.com/repos/nens/lizard-client/subscription","commits_url":"https://api.github.com/repos/nens/lizard-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/nens/lizard-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/nens/lizard-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/nens/lizard-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/nens/lizard-client/contents/{+path}","compare_url":"https://api.github.com/repos/nens/lizard-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nens/lizard-client/merges","archive_url":"https://api.github.com/repos/nens/lizard-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nens/lizard-client/downloads","issues_url":"https://api.github.com/repos/nens/lizard-client/issues{/number}","pulls_url":"https://api.github.com/repos/nens/lizard-client/pulls{/number}","milestones_url":"https://api.github.com/repos/nens/lizard-client/milestones{/number}","notifications_url":"https://api.github.com/repos/nens/lizard-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nens/lizard-client/labels{/name}","releases_url":"https://api.github.com/repos/nens/lizard-client/releases{/id}","deployments_url":"https://api.github.com/repos/nens/lizard-client/deployments","created_at":"2014-05-16T14:50:33Z","updated_at":"2016-12-08T09:01:03Z","pushed_at":"2016-12-12T12:23:50Z","git_url":"git://github.com/nens/lizard-client.git","ssh_url":"git@github.com:nens/lizard-client.git","clone_url":"https://github.com/nens/lizard-client.git","svn_url":"https://github.com/nens/lizard-client","homepage":"https://lizard.net","size":18361,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nens/lizard-client/pulls/750"},"html":{"href":"https://github.com/nens/lizard-client/pull/750"},"issue":{"href":"https://api.github.com/repos/nens/lizard-client/issues/750"},"comments":{"href":"https://api.github.com/repos/nens/lizard-client/issues/750/comments"},"review_comments":{"href":"https://api.github.com/repos/nens/lizard-client/pulls/750/comments"},"review_comment":{"href":"https://api.github.com/repos/nens/lizard-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nens/lizard-client/pulls/750/commits"},"statuses":{"href":"https://api.github.com/repos/nens/lizard-client/statuses/f51fdf51867c16f4f21620da5dd2a174bfa2f7cc"}}}}
{"actor":{"display_login":"RoelvandenBerg"}}