forcegraph: partially revert framerate limiting

This commit is contained in:
Nils Schneider 2015-04-16 21:01:46 +02:00
parent ef7f60179a
commit 9317346dfe

View File

@ -236,18 +236,7 @@ define(["d3"], function (d3) {
d.y + margin > screenRect.top && d.y - margin < screenRect.bottom d.y + margin > screenRect.top && d.y - margin < screenRect.bottom
} }
var oldTime = 0 function redraw() {
function redraw(time) {
var deltaTime = time - oldTime
if (deltaTime < 20) {
requestAnimationFrame(redraw)
return
}
oldTime = time
var translate = zoomBehavior.translate() var translate = zoomBehavior.translate()
var scale = zoomBehavior.scale() var scale = zoomBehavior.scale()
var links = intLinks.filter(visibleLinks) var links = intLinks.filter(visibleLinks)