Now the marker also works properly with the zoom

This commit is contained in:
ha7ilm 2017-05-25 12:07:10 +02:00
parent 3599259a25
commit bc0a65d495
1 changed files with 2 additions and 1 deletions

View File

@ -2433,7 +2433,8 @@ function secondary_demod_update_channel_freq_from_event(evt)
if(typeof evt !== "undefined")
{
var relativeX=(evt.offsetX)?evt.offsetX:evt.layerX;
secondary_demod_channel_freq=(relativeX/$(secondary_demod_canvas_container).width()) * (if_samp_rate/2);
secondary_demod_channel_freq=secondary_demod_low_cut +
(relativeX/$(secondary_demod_canvas_container).width()) * (secondary_demod_high_cut-secondary_demod_low_cut);
}
//console.log("toset:", secondary_demod_channel_freq);
if(!secondary_demod_waiting_for_set)