Skip to content

Commit

Permalink
Merge pull request #76 from bartdejonge1996/tracker-demo-fix
Browse files Browse the repository at this point in the history
Tracker demo fix
  • Loading branch information
Taeir authored Feb 2, 2018
2 parents 6765ada + 30b77f3 commit 419135f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
34 changes: 34 additions & 0 deletions tracker-server/public/javascripts/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,40 @@ $(document).ready(function() {
var options = {
nodes: {
shape: 'dot'
},
edges: {
color: {
opacity: 0.5
},
smooth: {
type: 'discrete'
}
},
layout: {
randomSeed: 2
},
physics: {
barnesHut: {
springLength: 1000
}
},
configure: {
filter:function (option, path) {
if (path.indexOf('physics') !== -1) {
return true;
}
if (path.indexOf('smooth') !== -1 || option === 'smooth') {
return true;
}
if (path.indexOf('color') !== -1 || option === 'color') {
return true;
}
if (path.indexOf('nodes') !== -1) {
return true;
}
return false;
},
container: document.getElementById('config')
}
};
network = new vis.Network(container, data, options);
Expand Down
2 changes: 2 additions & 0 deletions tracker-server/views/demo.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
</table>

<div id="demo-graph"></div>
<br>
<div id="config"></div>

</body>

Expand Down

0 comments on commit 419135f

Please sign in to comment.