langextract icon indicating copy to clipboard operation
langextract copied to clipboard

Clickable Entity Selector in Visualizations

Open bjg90 opened this issue 1 year ago • 0 comments

For your consideration, a couple of minor changes to the visualization compiler enabled clickable entity selection, which i found alot faster to review on a longer document:

<<<<<<< SEARCH
:start_line:78
-------
    .lx-highlight { position: relative; border-radius:3px; padding:1px 2px;}
=======
    .lx-highlight { position: relative; border-radius:3px; padding:1px 2px; cursor: pointer;}
>>>>>>> REPLACE
<<<<<<< SEARCH
:start_line:545
-------
        window.jumpToExtraction = jumpToExtraction;

        updateDisplay();
      }})();
=======
        window.jumpToExtraction = jumpToExtraction;

        document.getElementById('textWindow').addEventListener('click', (event) => {{
          const span = event.target.closest('.lx-highlight');
          if (span && span.dataset.idx) {{
            jumpToExtraction(span.dataset.idx);
          }}
        }});

        updateDisplay();
      }})();
>>>>>>> REPLACE

bjg90 avatar Aug 08 '25 19:08 bjg90