-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
42 lines (40 loc) · 833 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
Husky Navigation Content
> startup
> init
*/
// startup
initSaveToast();
initMap();
initLasso();
initOverlay();
fetch('Nodes.txt')
.then(res => res.text())
.then(txt => {
nodesTxt = txt;
parseNodes();
drawMarkers();
updateEdges();
console.log(nodes);
});
// init (after user selects data)
function init(txt, isLatestData) {
showControls();
if (isLatestData) { // continue with latest data
drawPreview();
drawTable();
handleCommands();
commandLoop();
} else { // custom data
nodesTxt = txt;
parseNodes();
console.log(nodes);
updatePreview();
drawPreview();
drawTable();
drawMarkers();
updateEdges();
handleCommands();
commandLoop();
}
}