locator wrappers aren't even needed

This commit is contained in:
Jakob Ketterl 2019-09-28 16:54:24 +02:00
parent 4c2979d242
commit 39a4366eab
2 changed files with 3 additions and 9 deletions

View File

@ -169,12 +169,6 @@ input[type=range]:focus::-ms-fill-upper
z-index: 1000;
}
#openwebrx-bookmarks-container .bookmark-locator {
display: inline-block;
position: absolute;
bottom: 0;
}
#openwebrx-bookmarks-container .bookmark {
font-size: 12px;
background-color: #FFFF00;

View File

@ -1340,7 +1340,7 @@ function update_bookmarks(bookmarks) {
$container = $('#openwebrx-bookmarks-container');
$container.empty();
bookmarks.forEach(function(b){
$bookmark = $('<div class="bookmark-locator"><div class="bookmark">' + b.name + '</div></div>');
$bookmark = $('<div class="bookmark">' + b.name + '</div>');
$bookmark.data(b);
$container.append($bookmark);
});
@ -1349,7 +1349,7 @@ function update_bookmarks(bookmarks) {
function position_bookmarks() {
range = get_visible_freq_range();
$('#openwebrx-bookmarks-container .bookmark-locator').each(function(){
$('#openwebrx-bookmarks-container .bookmark').each(function(){
$(this).css('left', scale_px_from_freq($(this).data('frequency'), range));
});
}
@ -1359,7 +1359,7 @@ function init_bookmarks() {
$container.click(function(e){
$container.find('.bookmark').removeClass('selected');
$bookmark = $(e.target);
b = $bookmark.closest('.bookmark-locator').data();
b = $bookmark.closest('.bookmark').data();
if (!b || !b.frequency || !b.modulation) return;
demodulator_set_offset_frequency(0, b.frequency - center_freq);
demodulator_analog_replace(b.modulation);