Skip to content

Commit

Permalink
clamp waterfall canvas width to 100% for fft_size < canvas_max_width
Browse files Browse the repository at this point in the history
  • Loading branch information
jwt27 committed Sep 29, 2020
1 parent 9e70473 commit cebe7c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/openwebrx.js
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ var canvas_actual_line;

function add_canvas() {
canvas_subcontainer = document.createElement("div");
var n = fft_size / canvas_max_width;
var n = Math.max(fft_size / canvas_max_width, 1);
var w = 100 / n;
for (var i = 0; i < n; ++i) {
var new_canvas = document.createElement("canvas");
Expand Down

0 comments on commit cebe7c7

Please sign in to comment.