Merge branch 'BirdNET-pi-main' into New-UI-API

This commit is contained in:
jaredb7
2023-05-17 20:04:19 +10:00
6 changed files with 16 additions and 8 deletions
+4 -2
View File
@@ -462,9 +462,10 @@ function generateMiniGraph(elem, comname) {
if (xhr.status === 200) {
var detections = JSON.parse(xhr.responseText);
console.log(detections)
// Create a div element for the chart window
if (typeof(window.chartWindow) != 'undefined') {
document.body.removeChild(window.chartWindow);
}
var chartWindow = document.createElement('div');
chartWindow.className = "chartdiv"
chartWindow.style.position = 'fixed';
@@ -575,6 +576,7 @@ function generateMiniGraph(elem, comname) {
document.body.removeChild(chartWindow);
});
chartWindow.appendChild(closeButton);
window.chartWindow = chartWindow;
}
};
xhr.send();