bum 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/bum +1 -1
- data/public/viz.js +16 -0
- metadata +4 -4
data/bin/bum
CHANGED
data/public/viz.js
CHANGED
@@ -107,9 +107,25 @@ function addNode(n) {
|
|
107
107
|
.attr("r", nodeRadius)
|
108
108
|
.call(force.drag);
|
109
109
|
|
110
|
+
var newName = vis.selectAll("text.name")
|
111
|
+
.data(data.nodes)
|
112
|
+
.enter().append('svg:text')
|
113
|
+
.attr('class', 'name')
|
114
|
+
.attr('x', function(d) { return d.x; })
|
115
|
+
.attr('y', function(d) { return d.y; })
|
116
|
+
.attr('text-anchor', 'middle')
|
117
|
+
.attr('dy', -(nodeRadius+8))
|
118
|
+
.attr('data-index', function(d, i) { return i; })
|
119
|
+
.text(function(d) {
|
120
|
+
return d.name;
|
121
|
+
})
|
122
|
+
.call(force.drag);
|
123
|
+
|
110
124
|
force.on("tick", function() {
|
111
125
|
newNode.attr("cx", function(d) { return d.x; })
|
112
126
|
.attr("cy", function(d) { return d.y; });
|
127
|
+
newName.attr("x", function(d) { return d.x; })
|
128
|
+
.attr("y", function(d) { return d.y; });
|
113
129
|
});
|
114
130
|
}
|
115
131
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 61
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 17
|
10
|
+
version: 0.0.17
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tyler McMullen
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-16 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|