[TASK] Put clients drawing together

This commit is contained in:
Xaver Maierhofer 2017-10-29 11:36:29 +01:00 committed by Xaver Maierhofer
parent 35fd75e4f6
commit e0630808e3
No known key found for this signature in database
GPG Key ID: 7FDCE23FD2EC9FE8
3 changed files with 4 additions and 7 deletions

View File

@ -10,7 +10,6 @@ define(['helper'], function (helper) {
var highlight; var highlight;
var nodeColor = '#fff'; var nodeColor = '#fff';
var clientColor = '#e6324b';
var highlightColor = 'rgba(255, 255, 255, 0.2)'; var highlightColor = 'rgba(255, 255, 255, 0.2)';
var labelColor = '#fff'; var labelColor = '#fff';
@ -20,10 +19,7 @@ define(['helper'], function (helper) {
function drawDetailNode(d) { function drawDetailNode(d) {
if (transform.k > 1) { if (transform.k > 1) {
ctx.beginPath();
ctx.fillStyle = clientColor;
helper.positionClients(ctx, d, Math.PI, d.o, 15); helper.positionClients(ctx, d, Math.PI, d.o, 15);
ctx.fill();
ctx.beginPath(); ctx.beginPath();
var name = d.o.node_id; var name = d.o.node_id;
if (d.o) { if (d.o) {

View File

@ -53,10 +53,7 @@ define(['leaflet', 'rbush', 'helper'],
p.x -= s.x; p.x -= s.x;
p.y -= s.y; p.y -= s.y;
ctx.beginPath();
ctx.fillStyle = 'rgba(220, 0, 103, 0.7)';
helper.positionClients(ctx, p, d.startAngle, d.node, startDistance); helper.positionClients(ctx, p, d.startAngle, d.node, startDistance);
ctx.fill();
}); });

View File

@ -162,6 +162,9 @@ define({
var a = 1.2; var a = 1.2;
var mode = 0; var mode = 0;
ctx.beginPath();
ctx.fillStyle = 'rgba(220, 0, 103, 0.7)';
for (var orbit = 0, i = 0; i < node.clients; orbit++) { for (var orbit = 0, i = 0; i < node.clients; orbit++) {
var distance = startDistance + orbit * 2 * radius * a; var distance = startDistance + orbit * 2 * radius * a;
var n = Math.floor((Math.PI * distance) / (a * radius)); var n = Math.floor((Math.PI * distance) / (a * radius));
@ -187,5 +190,6 @@ define({
ctx.arc(x, y, radius, 0, 2 * Math.PI); ctx.arc(x, y, radius, 0, 2 * Math.PI);
} }
} }
ctx.fill();
} }
}); });