[TASK] Show different vpn-links
This commit is contained in:
parent
4caf38e990
commit
31e8667658
@ -122,13 +122,13 @@ define(['d3-selection', 'd3-force', 'd3-zoom', 'd3-drag', 'd3-timer', 'd3-ease',
|
|||||||
|
|
||||||
forceLink = d3Force.forceLink()
|
forceLink = d3Force.forceLink()
|
||||||
.distance(function (d) {
|
.distance(function (d) {
|
||||||
if (d.o.type === 'vpn') {
|
if (d.o.type.indexOf('vpn') === 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 75;
|
return 75;
|
||||||
})
|
})
|
||||||
.strength(function (d) {
|
.strength(function (d) {
|
||||||
if (d.o.type === 'vpn') {
|
if (d.o.type.indexOf('vpn') === 0) {
|
||||||
return 0.02;
|
return 0.02;
|
||||||
}
|
}
|
||||||
return Math.max(0.5, d.o.source_tq);
|
return Math.max(0.5, d.o.source_tq);
|
||||||
|
@ -87,7 +87,7 @@ define(['helper'], function (helper) {
|
|||||||
|
|
||||||
ctx.lineTo(to[0], to[1]);
|
ctx.lineTo(to[0], to[1]);
|
||||||
ctx.strokeStyle = grd;
|
ctx.strokeStyle = grd;
|
||||||
if (d.o.type === 'vpn') {
|
if (d.o.type.indexOf('vpn') === 0) {
|
||||||
ctx.globalAlpha = 0.2;
|
ctx.globalAlpha = 0.2;
|
||||||
ctx.lineWidth = 1.5;
|
ctx.lineWidth = 1.5;
|
||||||
} else {
|
} else {
|
||||||
|
@ -97,7 +97,7 @@ define(['leaflet', 'rbush', 'helper', 'moment'],
|
|||||||
|
|
||||||
function addLinksToMap(dict, linkScale, graph, router) {
|
function addLinksToMap(dict, linkScale, graph, router) {
|
||||||
graph = graph.filter(function (d) {
|
graph = graph.filter(function (d) {
|
||||||
return 'distance' in d && !d.vpn;
|
return 'distance' in d && d.type.indexOf('vpn') !== 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
return graph.map(function (d) {
|
return graph.map(function (d) {
|
||||||
|
Loading…
Reference in New Issue
Block a user