mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-09-27 04:36:12 +08:00
style(network): add flex-grow to network div and move script tag
This commit is contained in:
@@ -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>
|
Reference in New Issue
Block a user