From 303468f2cd94d640a60f7bc7c321be8eba13fb1b Mon Sep 17 00:00:00 2001 From: Marat Fayzullin Date: Sun, 28 Apr 2024 22:24:05 -0400 Subject: [PATCH] Fixing spectrum display. --- htdocs/lib/Spectrum.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/lib/Spectrum.js b/htdocs/lib/Spectrum.js index 388ce0e2..38d927d7 100644 --- a/htdocs/lib/Spectrum.js +++ b/htdocs/lib/Spectrum.js @@ -37,8 +37,9 @@ Spectrum.prototype.update = function(data) { // this.min = Math.min(...data); // this.max = Math.max(...data); - this.min = waterfall_min_level - 5; - this.max = waterfall_max_level + 5; + var wf_range = Waterfall.getRange(); + this.min = wf_range.min - 5; + this.max = wf_range.max + 5; }; Spectrum.prototype.draw = function() {