[TASK] Add zoom limit for drawing clients in forcegraph

This commit is contained in:
Xaver Maierhofer 2017-02-08 00:14:48 +01:00 committed by Geno
parent cd0e59ffa9
commit d2090225c5

View File

@ -395,6 +395,7 @@ define(['d3', 'helper'], function (d3, helper) {
// -- draw clients -- // -- draw clients --
ctx.save(); ctx.save();
ctx.beginPath(); ctx.beginPath();
if (scale > 0.9) {
nodes.filter(visibleNodes).forEach(function (d) { nodes.filter(visibleNodes).forEach(function (d) {
var clients = d.o.node.statistics.clients; var clients = d.o.node.statistics.clients;
if (clients === 0) { if (clients === 0) {
@ -421,7 +422,7 @@ define(['d3', 'helper'], function (d3, helper) {
} }
} }
}); });
}
ctx.fillStyle = clientColor; ctx.fillStyle = clientColor;
ctx.fill(); ctx.fill();
ctx.restore(); ctx.restore();