Skip to content
Snippets Groups Projects
Unverified Commit 31e86676 authored by Martin Geno's avatar Martin Geno
Browse files

[TASK] Show different vpn-links

parent 4caf38e9
Branches
Tags
No related merge requests found
......@@ -122,13 +122,13 @@ define(['d3-selection', 'd3-force', 'd3-zoom', 'd3-drag', 'd3-timer', 'd3-ease',
forceLink = d3Force.forceLink()
.distance(function (d) {
if (d.o.type === 'vpn') {
if (d.o.type.indexOf('vpn') === 0) {
return 0;
}
return 75;
})
.strength(function (d) {
if (d.o.type === 'vpn') {
if (d.o.type.indexOf('vpn') === 0) {
return 0.02;
}
return Math.max(0.5, d.o.source_tq);
......
......@@ -87,7 +87,7 @@ define(['helper'], function (helper) {
ctx.lineTo(to[0], to[1]);
ctx.strokeStyle = grd;
if (d.o.type === 'vpn') {
if (d.o.type.indexOf('vpn') === 0) {
ctx.globalAlpha = 0.2;
ctx.lineWidth = 1.5;
} else {
......
......@@ -97,7 +97,7 @@ define(['leaflet', 'rbush', 'helper', 'moment'],
function addLinksToMap(dict, linkScale, graph, router) {
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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment