style(network): add flex-grow to network div and move script tag

This commit is contained in:
Sergey Krashevich
2024-06-16 14:53:08 +03:00
parent 1b411b1fed
commit a69eb8a66e

View File

@@ -18,11 +18,15 @@
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
#network {
flex-grow: 1;
}
</style> </style>
</head> </head>
<body> <body>
<script src="main.js"></script>
<div id="network"></div> <div id="network"></div>
<script src="main.js"></script>
<script> <script>
let network; let network;
let nodes = new vis.DataSet(); let nodes = new vis.DataSet();
@@ -65,7 +69,7 @@
} else { } else {
const positions = network.getPositions(); const positions = network.getPositions();
network.setData(data) network.setData(data);
for (const nodeId in positions) { for (const nodeId in positions) {
if (positions.hasOwnProperty(nodeId)) { if (positions.hasOwnProperty(nodeId)) {
@@ -85,5 +89,4 @@
}); });
</script> </script>
</body> </body>
</html> </html>