-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
65 lines (63 loc) · 1.49 KB
/
app.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/* globals d3, less */
import './docs/exampleDatasets/debugScripts.js';
import MainView from './views/MainView.js';
import * as SUBVIEW_CLASSES from './views/SubViews/SubViews.js';
window.CLASS_COLORS = window.recolorImageFilterList = [
'D95F02',
'1B9E77',
'7570B3',
'E7298A',
'66A61E',
'E6AB02',
'A6761D',
'B3E2CD',
'FDCDAC',
'CBD5E8',
'F4CAE4',
'E6F5C9',
'FFF2AE',
'F1E2CC'
];
window.SUBVIEW_CLASSES = SUBVIEW_CLASSES;
window.DEFAULT_LAYOUT = {
content: [
{
type: 'column',
content: [{
type: 'row',
content: [{
type: 'component',
componentName: 'NetworkModelView',
componentState: {},
isClosable: false
}]
}, {
type: 'row',
content: [{
type: 'stack',
content: [{
type: 'component',
componentName: 'TableView',
componentState: {
// An empty TableView
classId: null
},
isClosable: false
}]
}, {
type: 'component',
componentName: 'InstanceView',
componentState: {},
isClosable: false
}]
}]
}
]
};
const windowLoadPromise = new Promise((resolve, reject) => {
window.addEventListener('load', resolve);
});
Promise.all([windowLoadPromise, less.pageLoadFinished]).then(() => {
window.mainView = new MainView(d3.select('body'));
window.addEventListener('resize', () => { window.mainView.resize(); });
});