links: freeze nodes on hover

alfred-data
Nils Schneider 2012-06-08 02:31:22 +02:00
parent b5fa6acd3b
commit 0bc0760f89
1 changed files with 8 additions and 0 deletions

View File

@ -300,6 +300,14 @@ function update() {
var linkEnter = link.enter().append("g") var linkEnter = link.enter().append("g")
.attr("class", "link") .attr("class", "link")
.on("mouseover", function(d) {
d.source.fixed |= 2
d.target.fixed |= 2
})
.on("mouseout", function(d) {
d.source.fixed &= 1
d.target.fixed &= 1
})
linkEnter.append("line") linkEnter.append("line")