Skip to content

Commit

Permalink
chore: improve webview styling
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Nov 19, 2019
1 parent 1b43e4b commit 12429cc
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions static/depviz.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ $(document).ready(function() {
let node = {
id: task.id,
label: task.local_id,
multi: true,
shape: 'box',
}
switch (task.kind) {
case "Issue":
node.color = "lightblue";
break;
case "Milestone":
node.color = "lightgreen";
break;
default:
console.log("unknown task.kind", task)
}
//if (task.has_owner !== undefined) { edges.push({from: task.has_owner, to: task.id}) }
//if (task.has_author !== undefined) { edges.push({from: task.has_author, to: task.id}) }
Expand Down Expand Up @@ -51,10 +63,22 @@ $(document).ready(function() {
// create a network
var container = document.getElementById('network');
var data = {
nodes: new vis.DataSet(nodes),
edges: new vis.DataSet(edges),
nodes: nodes,
edges: edges,
};
var options = {
edges: {
smooth: {
forceDirection: 'none',
roundness: 0.8,
},
},
physics: {
//minVelocity: 0.1,
solver: 'repulsion',
stabilization: false,
},
};
var options = {};
var network = new vis.Network(container, data, options);
console.log("network", network);
},
Expand Down

0 comments on commit 12429cc

Please sign in to comment.