{"action":"created","comment":{"url":"https://api.github.com/repos/gem/oq-platform/pulls/comments/28322512","id":28322512,"diff_hunk":"@@ -254,23 +301,68 @@\n                     if (d.children){\n                         var operator = d.operator? d.operator : DEFAULT_OPERATOR;\n                         d.operator = operator;\n+                        if (operator.indexOf('ignore weights') != -1) {\n+                            parts = operator.split('(');\n+                            operator = parts[0];\n+                        }\n                         return operator;\n                     }\n                 })\n                 .style(\"fill\", function(d) {\n                     if (d.operator != undefined) {\n                         // Check for operators that ignore weights and style accordingly\n-                        var color;\n-                        if (d.operator.indexOf('ignore') != -1) {\n-                            color = '#660000';\n-                        } else {\n-                            color = 'black';\n+                        var color = 'black';\n+                        return color;\n+                    }\n+                })\n+                .attr(\"id\", function(d) {return \"operator-label-\" + d.level;})\n+                .attr(\"x\", function(d) { return Math.abs(d.weight) * CIRCLE_SCALE + 15; });\n+\n+\n+            // Render 'ignore weights' into a new line when present\n+            nodeEnter.append(\"text\")\n+                .text(function(d) {\n+                    if (d.children){\n+                        var ignoreWeightsStr = '';\n+                         if (d.operator.indexOf('ignore weights') != -1) {\n+                            parts = d.operator.split('(');\n+                            ignoreWeightsStr = '(' + parts[1];\n                         }\n+                        return ignoreWeightsStr;\n+                    }\n+                })\n+                .style(\"fill\", function(d) {\n+                    if (d.operator != undefined) {\n+                        // Check for operators that ignore weights and style accordingly\n+                        var color = '#660000';\n                         return color;\n                     }\n                 })\n                 .attr(\"id\", function(d) {return \"operator-label-\" + d.level;})\n-                .attr(\"x\", function(d) { return d.weight * CIRCLE_SCALE + 15; });\n+                .attr(\"x\", function(d) { return Math.abs(d.weight) * CIRCLE_SCALE + 15; })\n+                .attr(\"transform\", \"translate(0, 12)\");\n+\n+            // Render weight values in tree\n+            nodeEnter.append(\"text\")\n+                .attr(\"id\", (function(d) {return 'node-weight-' + d.name.replace(' ', '-'); }))\n+                .attr(\"class\", \"pointer\")\n+                .style(\"fill\", \"#0000EE\")\n+                .attr(\"x\", function(d) { return \"-1em\"; })\n+                .attr(\"dy\", function(d) {\n+                    if (typeof d.parent != \"undefined\" && d.x > d.parent.x){\n+                        return -(Math.abs(d.weight) * CIRCLE_SCALE + 5);","path":"openquakeplatform/openquakeplatform/static/js/irv_viewer_d3_tree.js","position":284,"original_position":284,"commit_id":"9b563c64e82fc67002b9ce78c60c2edaf60a3ede","original_commit_id":"9b563c64e82fc67002b9ce78c60c2edaf60a3ede","user":{"login":"ptormene","id":350930,"avatar_url":"https://avatars.githubusercontent.com/u/350930?v=3","gravatar_id":"","url":"https://api.github.com/users/ptormene","html_url":"https://github.com/ptormene","followers_url":"https://api.github.com/users/ptormene/followers","following_url":"https://api.github.com/users/ptormene/following{/other_user}","gists_url":"https://api.github.com/users/ptormene/gists{/gist_id}","starred_url":"https://api.github.com/users/ptormene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptormene/subscriptions","organizations_url":"https://api.github.com/users/ptormene/orgs","repos_url":"https://api.github.com/users/ptormene/repos","events_url":"https://api.github.com/users/ptormene/events{/privacy}","received_events_url":"https://api.github.com/users/ptormene/received_events","type":"User","site_admin":false},"body":"Same as above","created_at":"2015-04-14T12:41:52Z","updated_at":"2015-04-14T12:41:52Z","html_url":"https://github.com/gem/oq-platform/pull/395#discussion_r28322512","pull_request_url":"https://api.github.com/repos/gem/oq-platform/pulls/395","_links":{"self":{"href":"https://api.github.com/repos/gem/oq-platform/pulls/comments/28322512"},"html":{"href":"https://github.com/gem/oq-platform/pull/395#discussion_r28322512"},"pull_request":{"href":"https://api.github.com/repos/gem/oq-platform/pulls/395"}}},"pull_request":{"url":"https://api.github.com/repos/gem/oq-platform/pulls/395","id":33043875,"html_url":"https://github.com/gem/oq-platform/pull/395","diff_url":"https://github.com/gem/oq-platform/pull/395.diff","patch_url":"https://github.com/gem/oq-platform/pull/395.patch","issue_url":"https://api.github.com/repos/gem/oq-platform/issues/395","number":395,"state":"open","locked":false,"title":"Irv update tree2","user":{"login":"bwyss","id":340159,"avatar_url":"https://avatars.githubusercontent.com/u/340159?v=3","gravatar_id":"","url":"https://api.github.com/users/bwyss","html_url":"https://github.com/bwyss","followers_url":"https://api.github.com/users/bwyss/followers","following_url":"https://api.github.com/users/bwyss/following{/other_user}","gists_url":"https://api.github.com/users/bwyss/gists{/gist_id}","starred_url":"https://api.github.com/users/bwyss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwyss/subscriptions","organizations_url":"https://api.github.com/users/bwyss/orgs","repos_url":"https://api.github.com/users/bwyss/repos","events_url":"https://api.github.com/users/bwyss/events{/privacy}","received_events_url":"https://api.github.com/users/bwyss/received_events","type":"User","site_admin":false},"body":"This PR includes updated to the IRV tree chart from the QGIS SVIR plugin. \r\nSee https://github.com/gem/oq-svir-qgis/pull/35/","created_at":"2015-04-10T12:52:56Z","updated_at":"2015-04-14T12:41:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a1cf980279ffa1043621a16aa653c384b316b602","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gem/oq-platform/pulls/395/commits","review_comments_url":"https://api.github.com/repos/gem/oq-platform/pulls/395/comments","review_comment_url":"https://api.github.com/repos/gem/oq-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gem/oq-platform/issues/395/comments","statuses_url":"https://api.github.com/repos/gem/oq-platform/statuses/9b563c64e82fc67002b9ce78c60c2edaf60a3ede","head":{"label":"gem:irv-update-tree2","ref":"irv-update-tree2","sha":"9b563c64e82fc67002b9ce78c60c2edaf60a3ede","user":{"login":"gem","id":316546,"avatar_url":"https://avatars.githubusercontent.com/u/316546?v=3","gravatar_id":"","url":"https://api.github.com/users/gem","html_url":"https://github.com/gem","followers_url":"https://api.github.com/users/gem/followers","following_url":"https://api.github.com/users/gem/following{/other_user}","gists_url":"https://api.github.com/users/gem/gists{/gist_id}","starred_url":"https://api.github.com/users/gem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gem/subscriptions","organizations_url":"https://api.github.com/users/gem/orgs","repos_url":"https://api.github.com/users/gem/repos","events_url":"https://api.github.com/users/gem/events{/privacy}","received_events_url":"https://api.github.com/users/gem/received_events","type":"Organization","site_admin":false},"repo":{"id":5497412,"name":"oq-platform","full_name":"gem/oq-platform","owner":{"login":"gem","id":316546,"avatar_url":"https://avatars.githubusercontent.com/u/316546?v=3","gravatar_id":"","url":"https://api.github.com/users/gem","html_url":"https://github.com/gem","followers_url":"https://api.github.com/users/gem/followers","following_url":"https://api.github.com/users/gem/following{/other_user}","gists_url":"https://api.github.com/users/gem/gists{/gist_id}","starred_url":"https://api.github.com/users/gem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gem/subscriptions","organizations_url":"https://api.github.com/users/gem/orgs","repos_url":"https://api.github.com/users/gem/repos","events_url":"https://api.github.com/users/gem/events{/privacy}","received_events_url":"https://api.github.com/users/gem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gem/oq-platform","description":"OpenQuake Platform.","fork":false,"url":"https://api.github.com/repos/gem/oq-platform","forks_url":"https://api.github.com/repos/gem/oq-platform/forks","keys_url":"https://api.github.com/repos/gem/oq-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gem/oq-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gem/oq-platform/teams","hooks_url":"https://api.github.com/repos/gem/oq-platform/hooks","issue_events_url":"https://api.github.com/repos/gem/oq-platform/issues/events{/number}","events_url":"https://api.github.com/repos/gem/oq-platform/events","assignees_url":"https://api.github.com/repos/gem/oq-platform/assignees{/user}","branches_url":"https://api.github.com/repos/gem/oq-platform/branches{/branch}","tags_url":"https://api.github.com/repos/gem/oq-platform/tags","blobs_url":"https://api.github.com/repos/gem/oq-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gem/oq-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gem/oq-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/gem/oq-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gem/oq-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/gem/oq-platform/languages","stargazers_url":"https://api.github.com/repos/gem/oq-platform/stargazers","contributors_url":"https://api.github.com/repos/gem/oq-platform/contributors","subscribers_url":"https://api.github.com/repos/gem/oq-platform/subscribers","subscription_url":"https://api.github.com/repos/gem/oq-platform/subscription","commits_url":"https://api.github.com/repos/gem/oq-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/gem/oq-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/gem/oq-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/gem/oq-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/gem/oq-platform/contents/{+path}","compare_url":"https://api.github.com/repos/gem/oq-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gem/oq-platform/merges","archive_url":"https://api.github.com/repos/gem/oq-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gem/oq-platform/downloads","issues_url":"https://api.github.com/repos/gem/oq-platform/issues{/number}","pulls_url":"https://api.github.com/repos/gem/oq-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/gem/oq-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/gem/oq-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gem/oq-platform/labels{/name}","releases_url":"https://api.github.com/repos/gem/oq-platform/releases{/id}","created_at":"2012-08-21T16:00:07Z","updated_at":"2015-04-14T11:56:00Z","pushed_at":"2015-04-14T12:24:59Z","git_url":"git://github.com/gem/oq-platform.git","ssh_url":"git@github.com:gem/oq-platform.git","clone_url":"https://github.com/gem/oq-platform.git","svn_url":"https://github.com/gem/oq-platform","homepage":null,"size":159219,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":3,"default_branch":"master"}},"base":{"label":"gem:master","ref":"master","sha":"bbce4bf3a1a6b4ef8b3a5a1477961e13757c0e09","user":{"login":"gem","id":316546,"avatar_url":"https://avatars.githubusercontent.com/u/316546?v=3","gravatar_id":"","url":"https://api.github.com/users/gem","html_url":"https://github.com/gem","followers_url":"https://api.github.com/users/gem/followers","following_url":"https://api.github.com/users/gem/following{/other_user}","gists_url":"https://api.github.com/users/gem/gists{/gist_id}","starred_url":"https://api.github.com/users/gem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gem/subscriptions","organizations_url":"https://api.github.com/users/gem/orgs","repos_url":"https://api.github.com/users/gem/repos","events_url":"https://api.github.com/users/gem/events{/privacy}","received_events_url":"https://api.github.com/users/gem/received_events","type":"Organization","site_admin":false},"repo":{"id":5497412,"name":"oq-platform","full_name":"gem/oq-platform","owner":{"login":"gem","id":316546,"avatar_url":"https://avatars.githubusercontent.com/u/316546?v=3","gravatar_id":"","url":"https://api.github.com/users/gem","html_url":"https://github.com/gem","followers_url":"https://api.github.com/users/gem/followers","following_url":"https://api.github.com/users/gem/following{/other_user}","gists_url":"https://api.github.com/users/gem/gists{/gist_id}","starred_url":"https://api.github.com/users/gem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gem/subscriptions","organizations_url":"https://api.github.com/users/gem/orgs","repos_url":"https://api.github.com/users/gem/repos","events_url":"https://api.github.com/users/gem/events{/privacy}","received_events_url":"https://api.github.com/users/gem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gem/oq-platform","description":"OpenQuake Platform.","fork":false,"url":"https://api.github.com/repos/gem/oq-platform","forks_url":"https://api.github.com/repos/gem/oq-platform/forks","keys_url":"https://api.github.com/repos/gem/oq-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gem/oq-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gem/oq-platform/teams","hooks_url":"https://api.github.com/repos/gem/oq-platform/hooks","issue_events_url":"https://api.github.com/repos/gem/oq-platform/issues/events{/number}","events_url":"https://api.github.com/repos/gem/oq-platform/events","assignees_url":"https://api.github.com/repos/gem/oq-platform/assignees{/user}","branches_url":"https://api.github.com/repos/gem/oq-platform/branches{/branch}","tags_url":"https://api.github.com/repos/gem/oq-platform/tags","blobs_url":"https://api.github.com/repos/gem/oq-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gem/oq-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gem/oq-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/gem/oq-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gem/oq-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/gem/oq-platform/languages","stargazers_url":"https://api.github.com/repos/gem/oq-platform/stargazers","contributors_url":"https://api.github.com/repos/gem/oq-platform/contributors","subscribers_url":"https://api.github.com/repos/gem/oq-platform/subscribers","subscription_url":"https://api.github.com/repos/gem/oq-platform/subscription","commits_url":"https://api.github.com/repos/gem/oq-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/gem/oq-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/gem/oq-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/gem/oq-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/gem/oq-platform/contents/{+path}","compare_url":"https://api.github.com/repos/gem/oq-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gem/oq-platform/merges","archive_url":"https://api.github.com/repos/gem/oq-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gem/oq-platform/downloads","issues_url":"https://api.github.com/repos/gem/oq-platform/issues{/number}","pulls_url":"https://api.github.com/repos/gem/oq-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/gem/oq-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/gem/oq-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gem/oq-platform/labels{/name}","releases_url":"https://api.github.com/repos/gem/oq-platform/releases{/id}","created_at":"2012-08-21T16:00:07Z","updated_at":"2015-04-14T11:56:00Z","pushed_at":"2015-04-14T12:24:59Z","git_url":"git://github.com/gem/oq-platform.git","ssh_url":"git@github.com:gem/oq-platform.git","clone_url":"https://github.com/gem/oq-platform.git","svn_url":"https://github.com/gem/oq-platform","homepage":null,"size":159219,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gem/oq-platform/pulls/395"},"html":{"href":"https://github.com/gem/oq-platform/pull/395"},"issue":{"href":"https://api.github.com/repos/gem/oq-platform/issues/395"},"comments":{"href":"https://api.github.com/repos/gem/oq-platform/issues/395/comments"},"review_comments":{"href":"https://api.github.com/repos/gem/oq-platform/pulls/395/comments"},"review_comment":{"href":"https://api.github.com/repos/gem/oq-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gem/oq-platform/pulls/395/commits"},"statuses":{"href":"https://api.github.com/repos/gem/oq-platform/statuses/9b563c64e82fc67002b9ce78c60c2edaf60a3ede"}}}}