-1 && !forceClose) {
35 | cn = cn.slice(0, closedIdx)
36 | } else {
37 | cn = cn + " closed"
38 | }
39 | el.parentNode.className = cn
40 | }
41 |
42 | let clickers = Array.prototype.slice.call(document.querySelectorAll(".graph-form h2"))
43 |
44 | clickers.forEach((clicker, idx, arr) => {
45 | clicker.onclick = function() {
46 | return function (el, idx) {
47 | let others = clickers.filter((el, currIdx, arr) => idx !== currIdx)
48 | others.forEach(clicker => toggleClosedClass(clicker, true))
49 | toggleClosedClass(el, false)
50 | }(this, idx)
51 | }
52 | })
53 |
54 | // Form actions
55 | document.querySelector("#fetchForm").onsubmit = evt => {
56 | evt.preventDefault()
57 | getGraph()
58 | }
59 |
60 | document.querySelector("#optsForm").onsubmit = evt => {
61 | evt.preventDefault()
62 | drawGraph()
63 | }
64 |
--------------------------------------------------------------------------------
/ui/network/graph.css:
--------------------------------------------------------------------------------
1 | input[type=text] {
2 | width: 60px;
3 | }
4 |
--------------------------------------------------------------------------------
/ui/network/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
17 |
18 |
19 | collections:
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | distance range:
29 |
30 |
31 |
32 |
33 | node radius range:
34 |
35 |
36 |
37 |
38 | edge width range:
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/version.sbt:
--------------------------------------------------------------------------------
1 | version in ThisBuild := "1.1-SNAPSHOT"
2 |
--------------------------------------------------------------------------------