{"action":"created","comment":{"url":"https://api.github.com/repos/topogram/topogram-client/pulls/comments/45186006","id":45186006,"diff_hunk":"@@ -95,6 +97,108 @@ Template.networkTools.events = {\n         // }) \n \n     },\n+    'change #countEdgeViewParam1': function(e, template) {\n+\n+        var net = template.view.parentView._templateInstance.network.get().net;\n+        //var val = $(e.currentTarget).find('value').val();\n+        var val = parseInt(countEdgeViewParam1.value);\n+        var val2 = parseInt(countEdgeViewParam2.value);\n+        var val3 = parseInt(countEdgeViewParam3.value);\n+\n+        console.log(\"values\", val, val2, val3);\n+\n+        net.edges().forEach(function(ele) {\n+            //FIXME:\n+            ele.data().count = ele.data().width\n+            var width = parseInt(ele.data().count);\n+            //TODO: D3 SCALE\n+            // console.log(\"widthedge\", width)\n+            if (width <= val) {\n+                color = '#ECECEC'\n+            } else if (width > val && width <= val2) {\n+                color = '#2BBBAD'\n+            } else if (width > val2 && width <= val3) {\n+                color = '#42A5F5'\n+            } else if (width > val3) {\n+                color = '#EF5350'\n+            } else {\n+                color = '#000000'\n+            }\n+            ele.style({\n+                'line-color': ele.data('starred') ? 'yellow' : color\n+            })\n+        })\n+\n+\n+    },\n+    'change #countEdgeViewParam2': function(e, template) {\n+\n+        var net = template.view.parentView._templateInstance.network.get().net;\n+        //var val = $(e.currentTarget).find('value').val();\n+        var val = parseInt(countEdgeViewParam1.value);\n+        var val2 = parseInt(countEdgeViewParam2.value);\n+        var val3 = parseInt(countEdgeViewParam3.value);\n+\n+        console.log(\"values\", val, val2, val3);\n+\n+        net.edges().forEach(function(ele) {\n+            //FIXME:\n+            ele.data().count = ele.data().width\n+            var width = parseInt(ele.data().count);\n+            //TODO: D3 SCALE\n+            // console.log(\"widthedge\", width)\n+            if (width <= val) {\n+                color = '#ECECEC'\n+            } else if (width > val && width <= val2) {\n+                color = '#2BBBAD'\n+            } else if (width > val2 && width <= val3) {\n+                color = '#42A5F5'\n+            } else if (width > val3) {\n+                color = '#EF5350'\n+            } else {\n+                color = '#000000'\n+            }\n+            ele.style({\n+                'line-color': ele.data('starred') ? 'yellow' : color\n+            })\n+        })\n+\n+\n+    },\n+    'change #countEdgeViewParam3': function(e, template) {\n+\n+        var net = template.view.parentView._templateInstance.network.get().net;\n+        //var val = $(e.currentTarget).find('value').val();\n+        var val = parseInt(countEdgeViewParam1.value);\n+        var val2 = parseInt(countEdgeViewParam2.value);\n+        var val3 = parseInt(countEdgeViewParam3.value);\n+\n+        console.log(\"values\", val, val2, val3);\n+\n+        net.edges().forEach(function(ele) {\n+            //FIXME:\n+            ele.data().count = ele.data().width\n+            var width = parseInt(ele.data().count);\n+            //TODO: D3 SCALE","path":"client/network/networkTools/networkTools.js","position":124,"original_position":124,"commit_id":"15829a91a89d23a04c328ca0c1a7983e9510d23e","original_commit_id":"15829a91a89d23a04c328ca0c1a7983e9510d23e","user":{"login":"clemsos","id":743246,"avatar_url":"https://avatars.githubusercontent.com/u/743246?v=3","gravatar_id":"","url":"https://api.github.com/users/clemsos","html_url":"https://github.com/clemsos","followers_url":"https://api.github.com/users/clemsos/followers","following_url":"https://api.github.com/users/clemsos/following{/other_user}","gists_url":"https://api.github.com/users/clemsos/gists{/gist_id}","starred_url":"https://api.github.com/users/clemsos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clemsos/subscriptions","organizations_url":"https://api.github.com/users/clemsos/orgs","repos_url":"https://api.github.com/users/clemsos/repos","events_url":"https://api.github.com/users/clemsos/events{/privacy}","received_events_url":"https://api.github.com/users/clemsos/received_events","type":"User","site_admin":false},"body":"You need to turn all this in d3.scale ?","created_at":"2015-11-18T11:01:58Z","updated_at":"2015-11-18T11:01:58Z","html_url":"https://github.com/topogram/topogram-client/pull/29#discussion_r45186006","pull_request_url":"https://api.github.com/repos/topogram/topogram-client/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/topogram/topogram-client/pulls/comments/45186006"},"html":{"href":"https://github.com/topogram/topogram-client/pull/29#discussion_r45186006"},"pull_request":{"href":"https://api.github.com/repos/topogram/topogram-client/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/topogram/topogram-client/pulls/29","id":51063495,"html_url":"https://github.com/topogram/topogram-client/pull/29","diff_url":"https://github.com/topogram/topogram-client/pull/29.diff","patch_url":"https://github.com/topogram/topogram-client/pull/29.patch","issue_url":"https://api.github.com/repos/topogram/topogram-client/issues/29","number":29,"state":"open","locked":false,"title":"Devgb","user":{"login":"ungentilgarcon","id":6549562,"avatar_url":"https://avatars.githubusercontent.com/u/6549562?v=3","gravatar_id":"","url":"https://api.github.com/users/ungentilgarcon","html_url":"https://github.com/ungentilgarcon","followers_url":"https://api.github.com/users/ungentilgarcon/followers","following_url":"https://api.github.com/users/ungentilgarcon/following{/other_user}","gists_url":"https://api.github.com/users/ungentilgarcon/gists{/gist_id}","starred_url":"https://api.github.com/users/ungentilgarcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ungentilgarcon/subscriptions","organizations_url":"https://api.github.com/users/ungentilgarcon/orgs","repos_url":"https://api.github.com/users/ungentilgarcon/repos","events_url":"https://api.github.com/users/ungentilgarcon/events{/privacy}","received_events_url":"https://api.github.com/users/ungentilgarcon/received_events","type":"User","site_admin":false},"body":"I think it is ready to merge to main branch","created_at":"2015-11-18T10:01:28Z","updated_at":"2015-11-18T11:01:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7eb6bace2cb649e0a12e8c675b76ed76093d2105","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/topogram/topogram-client/pulls/29/commits","review_comments_url":"https://api.github.com/repos/topogram/topogram-client/pulls/29/comments","review_comment_url":"https://api.github.com/repos/topogram/topogram-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/topogram/topogram-client/issues/29/comments","statuses_url":"https://api.github.com/repos/topogram/topogram-client/statuses/15829a91a89d23a04c328ca0c1a7983e9510d23e","head":{"label":"topogram:DEVGB","ref":"DEVGB","sha":"15829a91a89d23a04c328ca0c1a7983e9510d23e","user":{"login":"topogram","id":8240632,"avatar_url":"https://avatars.githubusercontent.com/u/8240632?v=3","gravatar_id":"","url":"https://api.github.com/users/topogram","html_url":"https://github.com/topogram","followers_url":"https://api.github.com/users/topogram/followers","following_url":"https://api.github.com/users/topogram/following{/other_user}","gists_url":"https://api.github.com/users/topogram/gists{/gist_id}","starred_url":"https://api.github.com/users/topogram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topogram/subscriptions","organizations_url":"https://api.github.com/users/topogram/orgs","repos_url":"https://api.github.com/users/topogram/repos","events_url":"https://api.github.com/users/topogram/events{/privacy}","received_events_url":"https://api.github.com/users/topogram/received_events","type":"Organization","site_admin":false},"repo":{"id":43800877,"name":"topogram-client","full_name":"topogram/topogram-client","owner":{"login":"topogram","id":8240632,"avatar_url":"https://avatars.githubusercontent.com/u/8240632?v=3","gravatar_id":"","url":"https://api.github.com/users/topogram","html_url":"https://github.com/topogram","followers_url":"https://api.github.com/users/topogram/followers","following_url":"https://api.github.com/users/topogram/following{/other_user}","gists_url":"https://api.github.com/users/topogram/gists{/gist_id}","starred_url":"https://api.github.com/users/topogram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topogram/subscriptions","organizations_url":"https://api.github.com/users/topogram/orgs","repos_url":"https://api.github.com/users/topogram/repos","events_url":"https://api.github.com/users/topogram/events{/privacy}","received_events_url":"https://api.github.com/users/topogram/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/topogram/topogram-client","description":"Geo-network visualizations","fork":false,"url":"https://api.github.com/repos/topogram/topogram-client","forks_url":"https://api.github.com/repos/topogram/topogram-client/forks","keys_url":"https://api.github.com/repos/topogram/topogram-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/topogram/topogram-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/topogram/topogram-client/teams","hooks_url":"https://api.github.com/repos/topogram/topogram-client/hooks","issue_events_url":"https://api.github.com/repos/topogram/topogram-client/issues/events{/number}","events_url":"https://api.github.com/repos/topogram/topogram-client/events","assignees_url":"https://api.github.com/repos/topogram/topogram-client/assignees{/user}","branches_url":"https://api.github.com/repos/topogram/topogram-client/branches{/branch}","tags_url":"https://api.github.com/repos/topogram/topogram-client/tags","blobs_url":"https://api.github.com/repos/topogram/topogram-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/topogram/topogram-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/topogram/topogram-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/topogram/topogram-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/topogram/topogram-client/statuses/{sha}","languages_url":"https://api.github.com/repos/topogram/topogram-client/languages","stargazers_url":"https://api.github.com/repos/topogram/topogram-client/stargazers","contributors_url":"https://api.github.com/repos/topogram/topogram-client/contributors","subscribers_url":"https://api.github.com/repos/topogram/topogram-client/subscribers","subscription_url":"https://api.github.com/repos/topogram/topogram-client/subscription","commits_url":"https://api.github.com/repos/topogram/topogram-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/topogram/topogram-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/topogram/topogram-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/topogram/topogram-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/topogram/topogram-client/contents/{+path}","compare_url":"https://api.github.com/repos/topogram/topogram-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/topogram/topogram-client/merges","archive_url":"https://api.github.com/repos/topogram/topogram-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/topogram/topogram-client/downloads","issues_url":"https://api.github.com/repos/topogram/topogram-client/issues{/number}","pulls_url":"https://api.github.com/repos/topogram/topogram-client/pulls{/number}","milestones_url":"https://api.github.com/repos/topogram/topogram-client/milestones{/number}","notifications_url":"https://api.github.com/repos/topogram/topogram-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/topogram/topogram-client/labels{/name}","releases_url":"https://api.github.com/repos/topogram/topogram-client/releases{/id}","created_at":"2015-10-07T07:27:06Z","updated_at":"2015-10-07T13:16:33Z","pushed_at":"2015-11-18T10:49:50Z","git_url":"git://github.com/topogram/topogram-client.git","ssh_url":"git@github.com:topogram/topogram-client.git","clone_url":"https://github.com/topogram/topogram-client.git","svn_url":"https://github.com/topogram/topogram-client","homepage":"http://app.topogram.io","size":270,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":25,"forks":1,"open_issues":25,"watchers":0,"default_branch":"master"}},"base":{"label":"topogram:master","ref":"master","sha":"a11bf7f2b5ef9d52c68a79499e69cbb87de88130","user":{"login":"topogram","id":8240632,"avatar_url":"https://avatars.githubusercontent.com/u/8240632?v=3","gravatar_id":"","url":"https://api.github.com/users/topogram","html_url":"https://github.com/topogram","followers_url":"https://api.github.com/users/topogram/followers","following_url":"https://api.github.com/users/topogram/following{/other_user}","gists_url":"https://api.github.com/users/topogram/gists{/gist_id}","starred_url":"https://api.github.com/users/topogram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topogram/subscriptions","organizations_url":"https://api.github.com/users/topogram/orgs","repos_url":"https://api.github.com/users/topogram/repos","events_url":"https://api.github.com/users/topogram/events{/privacy}","received_events_url":"https://api.github.com/users/topogram/received_events","type":"Organization","site_admin":false},"repo":{"id":43800877,"name":"topogram-client","full_name":"topogram/topogram-client","owner":{"login":"topogram","id":8240632,"avatar_url":"https://avatars.githubusercontent.com/u/8240632?v=3","gravatar_id":"","url":"https://api.github.com/users/topogram","html_url":"https://github.com/topogram","followers_url":"https://api.github.com/users/topogram/followers","following_url":"https://api.github.com/users/topogram/following{/other_user}","gists_url":"https://api.github.com/users/topogram/gists{/gist_id}","starred_url":"https://api.github.com/users/topogram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topogram/subscriptions","organizations_url":"https://api.github.com/users/topogram/orgs","repos_url":"https://api.github.com/users/topogram/repos","events_url":"https://api.github.com/users/topogram/events{/privacy}","received_events_url":"https://api.github.com/users/topogram/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/topogram/topogram-client","description":"Geo-network visualizations","fork":false,"url":"https://api.github.com/repos/topogram/topogram-client","forks_url":"https://api.github.com/repos/topogram/topogram-client/forks","keys_url":"https://api.github.com/repos/topogram/topogram-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/topogram/topogram-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/topogram/topogram-client/teams","hooks_url":"https://api.github.com/repos/topogram/topogram-client/hooks","issue_events_url":"https://api.github.com/repos/topogram/topogram-client/issues/events{/number}","events_url":"https://api.github.com/repos/topogram/topogram-client/events","assignees_url":"https://api.github.com/repos/topogram/topogram-client/assignees{/user}","branches_url":"https://api.github.com/repos/topogram/topogram-client/branches{/branch}","tags_url":"https://api.github.com/repos/topogram/topogram-client/tags","blobs_url":"https://api.github.com/repos/topogram/topogram-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/topogram/topogram-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/topogram/topogram-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/topogram/topogram-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/topogram/topogram-client/statuses/{sha}","languages_url":"https://api.github.com/repos/topogram/topogram-client/languages","stargazers_url":"https://api.github.com/repos/topogram/topogram-client/stargazers","contributors_url":"https://api.github.com/repos/topogram/topogram-client/contributors","subscribers_url":"https://api.github.com/repos/topogram/topogram-client/subscribers","subscription_url":"https://api.github.com/repos/topogram/topogram-client/subscription","commits_url":"https://api.github.com/repos/topogram/topogram-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/topogram/topogram-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/topogram/topogram-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/topogram/topogram-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/topogram/topogram-client/contents/{+path}","compare_url":"https://api.github.com/repos/topogram/topogram-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/topogram/topogram-client/merges","archive_url":"https://api.github.com/repos/topogram/topogram-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/topogram/topogram-client/downloads","issues_url":"https://api.github.com/repos/topogram/topogram-client/issues{/number}","pulls_url":"https://api.github.com/repos/topogram/topogram-client/pulls{/number}","milestones_url":"https://api.github.com/repos/topogram/topogram-client/milestones{/number}","notifications_url":"https://api.github.com/repos/topogram/topogram-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/topogram/topogram-client/labels{/name}","releases_url":"https://api.github.com/repos/topogram/topogram-client/releases{/id}","created_at":"2015-10-07T07:27:06Z","updated_at":"2015-10-07T13:16:33Z","pushed_at":"2015-11-18T10:49:50Z","git_url":"git://github.com/topogram/topogram-client.git","ssh_url":"git@github.com:topogram/topogram-client.git","clone_url":"https://github.com/topogram/topogram-client.git","svn_url":"https://github.com/topogram/topogram-client","homepage":"http://app.topogram.io","size":270,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":25,"forks":1,"open_issues":25,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/topogram/topogram-client/pulls/29"},"html":{"href":"https://github.com/topogram/topogram-client/pull/29"},"issue":{"href":"https://api.github.com/repos/topogram/topogram-client/issues/29"},"comments":{"href":"https://api.github.com/repos/topogram/topogram-client/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/topogram/topogram-client/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/topogram/topogram-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/topogram/topogram-client/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/topogram/topogram-client/statuses/15829a91a89d23a04c328ca0c1a7983e9510d23e"}}}}