forcegraph: tweaks

This commit is contained in:
Nils Schneider 2015-08-02 00:34:53 +02:00
parent ca0d3bd47d
commit 8b10d2ec10
1 changed files with 4 additions and 6 deletions

View File

@ -381,7 +381,6 @@ define(["d3"], function (d3) {
})
ctx.fillStyle = clientColor
ctx.globalCompositeOperation = "overlay"
ctx.fill()
ctx.restore()
@ -395,13 +394,12 @@ define(["d3"], function (d3) {
ctx.globalCompositeOperation = "lighten"
ctx.fillStyle = highlightColor
ctx.beginPath()
highlightedNodes.forEach(function (d) {
ctx.beginPath()
ctx.moveTo(d.x + 5 * nodeRadius, d.y)
ctx.arc(d.x, d.y, 5 * nodeRadius, 0, 2 * Math.PI)
ctx.fill()
ctx.restore()
})
ctx.fill()
ctx.restore()
}
@ -418,12 +416,12 @@ define(["d3"], function (d3) {
ctx.strokeStyle = highlightColor
ctx.lineCap = "round"
ctx.beginPath()
highlightedLinks.forEach(function (d) {
ctx.beginPath()
ctx.moveTo(d.source.x, d.source.y)
ctx.lineTo(d.target.x, d.target.y)
ctx.stroke()
})
ctx.stroke()
ctx.restore()
}