From 97f3642262440f3a60d298c4167bcdc251f4c073 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sun, 13 Sep 2020 15:35:32 +0200 Subject: [PATCH] fix mouse wheel tuning for frequencies < 1MHz --- htdocs/lib/FrequencyDisplay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/lib/FrequencyDisplay.js b/htdocs/lib/FrequencyDisplay.js index 8210592..d475cf2 100644 --- a/htdocs/lib/FrequencyDisplay.js +++ b/htdocs/lib/FrequencyDisplay.js @@ -58,7 +58,7 @@ TuneableFrequencyDisplay.prototype.setupEvents = function() { var index = me.digitContainer.find('.digit').index(e.target); if (index < 0) return; - var delta = 10 ** (Math.floor(Math.log10(me.frequency)) - index); + var delta = 10 ** (Math.floor(Math.max(6, Math.log10(me.frequency))) - index); if (e.originalEvent.deltaY > 0) delta *= -1; var newFrequency = me.frequency + delta;