[TASK] Put clients drawing together
This commit is contained in:
parent
35fd75e4f6
commit
e0630808e3
@ -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();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user