links: freeze nodes on hover

This commit is contained in:
Nils Schneider 2012-06-08 02:31:22 +02:00
parent b5fa6acd3b
commit 0bc0760f89

View file

@ -300,6 +300,14 @@ function update() {
var linkEnter = link.enter().append("g")
.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")