From f41786becb2d431eadb25b621ac5a626bb1fd5bc Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Sat, 26 Dec 2020 02:34:45 +0100 Subject: [PATCH] Merge pull request #2353 from limonspb/fix_aux_marker Fix markers on aux tab --- src/js/tabs/auxiliary.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/js/tabs/auxiliary.js b/src/js/tabs/auxiliary.js index 359502f5..4c94e21f 100644 --- a/src/js/tabs/auxiliary.js +++ b/src/js/tabs/auxiliary.js @@ -409,16 +409,16 @@ TABS.auxiliary.initialize = function (callback) { } return channelPosition; } - + function update_marker(auxChannelIndex, channelPosition) { - var percentage = (channelPosition - 900) / (2100-900) * 100; - + const percentage = (channelPosition - 900) / (2100-900) * 100; + $('.modes .ranges .range').each( function () { - var auxChannelCandidateIndex = $(this).find('.channel').val(); - if (auxChannelCandidateIndex != auxChannelIndex) { + const auxChannelCandidateIndex = parseInt($(this).find('.channel').val()); + if (auxChannelCandidateIndex !== auxChannelIndex) { return; } - + $(this).find('.marker').css('left', percentage + '%'); }); }