diff --git a/static/css/satellite_dashboard.css b/static/css/satellite_dashboard.css index 3f9a327..83c7a6c 100644 --- a/static/css/satellite_dashboard.css +++ b/static/css/satellite_dashboard.css @@ -753,8 +753,6 @@ body { #polarPlot { display: block; width: 100%; - height: 100%; - max-width: 100%; max-height: 100%; aspect-ratio: 1 / 1; } diff --git a/templates/satellite_dashboard.html b/templates/satellite_dashboard.html index 5406a86..cd19d8b 100644 --- a/templates/satellite_dashboard.html +++ b/templates/satellite_dashboard.html @@ -2289,8 +2289,7 @@ function drawPolarPlot(pass) { const canvas = document.getElementById('polarPlot'); const ctx = canvas.getContext('2d'); - const rect = canvas.getBoundingClientRect(); - const size = Math.round(Math.min(rect.width, rect.height || rect.width)); + const size = canvas.offsetWidth || 300; canvas.width = size; canvas.height = size; @@ -2518,8 +2517,7 @@ function drawPolarPlotWithPosition(az, el, color) { const canvas = document.getElementById('polarPlot'); const ctx = canvas.getContext('2d'); - const rect = canvas.getBoundingClientRect(); - const size = Math.round(Math.min(rect.width, rect.height || rect.width)); + const size = canvas.offsetWidth || 300; canvas.width = size; canvas.height = size;