fix mouse wheel tuning for frequencies < 1MHz

This commit is contained in:
Jakob Ketterl 2020-09-13 15:35:32 +02:00
parent 0e8aece991
commit 97f3642262

View File

@ -58,7 +58,7 @@ TuneableFrequencyDisplay.prototype.setupEvents = function() {
var index = me.digitContainer.find('.digit').index(e.target); var index = me.digitContainer.find('.digit').index(e.target);
if (index < 0) return; 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; if (e.originalEvent.deltaY > 0) delta *= -1;
var newFrequency = me.frequency + delta; var newFrequency = me.frequency + delta;