|
97 | 97 | var x = - mynetwork.clientWidth / 2 + 50; |
98 | 98 | var y = - mynetwork.clientHeight / 2 + 50; |
99 | 99 | var step = 50; |
100 | | - nodes.push({id: 1000, x: x, y: y, label: 'Internet', group: 'internet', value: 1, fixed: true, labelPosition: 'right', physics:false}); |
101 | | - nodes.push({id: 1001, x: x, y: y + step, label: 'Switch', group: 'switch', value: 1, fixed: true, labelPosition: 'right', physics:false}); |
102 | | - nodes.push({id: 1002, x: x, y: y + 2 * step, label: 'Server', group: 'server', value: 1, fixed: true, labelPosition: 'right', physics:false}); |
103 | | - nodes.push({id: 1003, x: x, y: y + 3 * step, label: 'Computer', group: 'desktop', value: 1, fixed: true, labelPosition: 'right', physics:false}); |
104 | | - nodes.push({id: 1004, x: x, y: y + 4 * step, label: 'Smartphone', group: 'mobile', value: 1, fixed: true, labelPosition: 'right', physics:false}); |
| 100 | + nodes.push({id: 1000, x: x, y: y, label: 'Internet', group: 'internet', value: 1, labelPosition:'right', fixed: true, physics:false}); |
| 101 | + nodes.push({id: 1001, x: x, y: y + step, label: 'Switch', group: 'switch', value: 1, labelPosition:'right', fixed: true, physics:false}); |
| 102 | + nodes.push({id: 1002, x: x, y: y + 2 * step, label: 'Server', group: 'server', value: 1, labelPosition:'right', fixed: true, physics:false}); |
| 103 | + nodes.push({id: 1003, x: x, y: y + 3 * step, label: 'Computer', group: 'desktop', value: 1, labelPosition:'right', fixed: true, physics:false}); |
| 104 | + nodes.push({id: 1004, x: x, y: y + 4 * step, label: 'Smartphone', group: 'mobile', value: 1, labelPosition:'right', fixed: true, physics:false}); |
105 | 105 |
|
106 | 106 | // create a network |
107 | 107 | var container = document.getElementById('mynetwork'); |
|
0 commit comments