From f0f0f13c94ff22d0f8a105c604252c6d678a9bab Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 14 Jun 2024 16:08:05 +0200 Subject: [PATCH 1/1] other placement fix --- .../static/js/book_text/references.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/wolnelektury/static/js/book_text/references.js b/src/wolnelektury/static/js/book_text/references.js index 6abd103d4..9fd69282c 100644 --- a/src/wolnelektury/static/js/book_text/references.js +++ b/src/wolnelektury/static/js/book_text/references.js @@ -168,6 +168,9 @@ left: nx, right: right }); + $elem.css({ + display: "block" + }); if (!$elem.data('attach-bottom')) { ny = y - $elem.height() - 10; } else { @@ -180,9 +183,6 @@ left: leftoffset - 6 }); - $elem.css({ - display: "block" - }); } function closeNoteBox() { @@ -216,23 +216,12 @@ if ($(this).parents('#footnotes').length) return; event.preventDefault(); - - - let x = $(this).width() / 2, y = 0; - let elem = $(this); - while (elem.attr('id') != 'book-text') { - let p = $(elem).position(); - x += p.left; - y += p.top; - elem = elem.parent(); - } href = $(this).attr('href').substr(1); content = $("[name='" + href + "']").next().next().html(); if (!content) return; $("#annotation-content").html(content); $("#footnote-link").attr('href', '#' + href) - putNoteAt($('#annotation-box'), this); event.stopPropagation(); }); -- 2.20.1