Skip to content
Snippets Groups Projects
Unverified Commit e0630808 authored by Xaver Maierhofer's avatar Xaver Maierhofer Committed by Xaver Maierhofer
Browse files

[TASK] Put clients drawing together

parent 35fd75e4
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,6 @@ define(['helper'], function (helper) {
var highlight;
var nodeColor = '#fff';
var clientColor = '#e6324b';
var highlightColor = 'rgba(255, 255, 255, 0.2)';
var labelColor = '#fff';
......@@ -20,10 +19,7 @@ define(['helper'], function (helper) {
function drawDetailNode(d) {
if (transform.k > 1) {
ctx.beginPath();
ctx.fillStyle = clientColor;
helper.positionClients(ctx, d, Math.PI, d.o, 15);
ctx.fill();
ctx.beginPath();
var name = d.o.node_id;
if (d.o) {
......
......@@ -53,10 +53,7 @@ define(['leaflet', 'rbush', 'helper'],
p.x -= s.x;
p.y -= s.y;
ctx.beginPath();
ctx.fillStyle = 'rgba(220, 0, 103, 0.7)';
helper.positionClients(ctx, p, d.startAngle, d.node, startDistance);
ctx.fill();
});
......
......@@ -162,6 +162,9 @@ define({
var a = 1.2;
var mode = 0;
ctx.beginPath();
ctx.fillStyle = 'rgba(220, 0, 103, 0.7)';
for (var orbit = 0, i = 0; i < node.clients; orbit++) {
var distance = startDistance + orbit * 2 * radius * a;
var n = Math.floor((Math.PI * distance) / (a * radius));
......@@ -187,5 +190,6 @@ define({
ctx.arc(x, y, radius, 0, 2 * Math.PI);
}
}
ctx.fill();
}
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment