diff --git a/WebPageHtml.pas b/WebPageHtml.pas index af6416a..ab4208e 100644 --- a/WebPageHtml.pas +++ b/WebPageHtml.pas @@ -313,9 +313,9 @@ begin 'const nf=cl(f,30000,60000000);setHz(nf);renderVfos();onSend(nf);' + '});}' + 'bindVfo("vDispA",()=>vfoA,v=>{vfoA=v;},()=>stA,v=>{stA=v;},()=>stAmem,v=>{stAmem=v;},' + - 'function(nf){renderVfos();pend("freq");if(activeVfo==="A")ws2({cmd:"freq",hz:nf});else ws2({cmd:"freq_b",hz:nf});});' + + 'function(nf){renderVfos();pend("freq");if(activeVfo==="A"){localCenter=nf;ws2({cmd:"freq",hz:nf});}else ws2({cmd:"freq_b",hz:nf});});' + 'bindVfo("vDispB",()=>vfoB,v=>{vfoB=v;},()=>stB,v=>{stB=v;},()=>stBmem,v=>{stBmem=v;},' + - 'function(nf){renderVfos();pend("freq");if(activeVfo==="B")ws2({cmd:"freq",hz:nf});else ws2({cmd:"freq_b",hz:nf});});' + + 'function(nf){renderVfos();pend("freq");if(activeVfo==="B"){localCenter=nf;ws2({cmd:"freq",hz:nf});}else ws2({cmd:"freq_b",hz:nf});});' + 'function selVfo(w){' + 'activeVfo=w;' + @@ -530,9 +530,10 @@ begin 'cv.style.cursor="";' + 'if(e.button===2)return;' + 'if(dragging&&Math.abs(e.offsetX-dragX0)<4){' + - // клик — настраиваем на кликнутую частоту мгновенно + // клик — не трогаем localCenter: фильтр встаёт точно туда куда кликнули. + // Спектр остаётся на месте, сервер пришлёт center_hz через ~200ms и всё перецентрируется. 'const nf=cl(Math.round(xToHz(e.offsetX,cv.clientWidth)/100)*100,30000,60000000);' + - 'setActiveVfoHz(nf);localCenter=nf;' + + 'setActiveVfoHz(nf);' + 'if(activeVfo==="A")cur.vfo_a_hz=nf;else cur.vfo_b_hz=nf;' + 'renderVfos();pend("freq");ws2({cmd:"freq",hz:nf});' + '}' +