Merge pull request #2353 from limonspb/fix_aux_marker

Fix markers on aux tab
10.7-maintenance
Michael Keller 2020-12-26 02:34:45 +01:00
parent 78ad3ebf85
commit f41786becb
1 changed files with 6 additions and 6 deletions

View File

@ -409,16 +409,16 @@ TABS.auxiliary.initialize = function (callback) {
} }
return channelPosition; return channelPosition;
} }
function update_marker(auxChannelIndex, 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 () { $('.modes .ranges .range').each( function () {
var auxChannelCandidateIndex = $(this).find('.channel').val(); const auxChannelCandidateIndex = parseInt($(this).find('.channel').val());
if (auxChannelCandidateIndex != auxChannelIndex) { if (auxChannelCandidateIndex !== auxChannelIndex) {
return; return;
} }
$(this).find('.marker').css('left', percentage + '%'); $(this).find('.marker').css('left', percentage + '%');
}); });
} }