summaryrefslogtreecommitdiff
path: root/bubble.js
diff options
context:
space:
mode:
Diffstat (limited to 'bubble.js')
-rw-r--r--bubble.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/bubble.js b/bubble.js
index 81435e2..d6868a3 100644
--- a/bubble.js
+++ b/bubble.js
@@ -231,8 +231,12 @@ function processData(data) {
// display user block
userInfo.style('display', 'block');
- userInfo.select('.name')
+ userInfo.select('.name a').remove();
+ userInfo.select('.name').append('a')
+ .attr('target', '_blank')
+ .attr('href', 'https://twitter.com/' + d.name)
.text(d.name);
+ userInfo.select('.userid').text(d.group);
userInfo.select('.tweet-count')
.text(d.tweetCount);
userInfo.select('.spam-status')
@@ -240,10 +244,10 @@ function processData(data) {
var nodes = {
'from': force.nodes().filter(function (edge) {
- return edge.relatedFrom.indexOf(d.index) >= 0;
+ return edge.relatedTo.indexOf(d.index) >= 0;
}),
'to': force.nodes().filter(function (edge) {
- return edge.relatedTo.indexOf(d.index) >= 0;
+ return edge.relatedFrom.indexOf(d.index) >= 0;
})
};
Object.keys(nodes).forEach(function (dir) {