Skip to content

Commit

Permalink
Port change over to HTML renderer as well
Browse files Browse the repository at this point in the history
  • Loading branch information
manzt committed Jan 23, 2025
1 parent 654f9b0 commit 1630e2a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/higlass/_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
</body>
<script type="module">
import * as hglib from "https://esm.sh/higlass@{{ higlass_version }}?deps=react@{{ react_version }},react-dom@{{ react_version }},pixi.js@{{ pixijs_version }}";
hglib.viewer(
document.getElementById('{{ output_div }}'),
{{ viewconf }},
);
</script>
let el = document.getElementById('{{ output_div }}');
hglib.viewer(el, {{ viewconf }});
// prevent right click events from bubbling up to Jupyter/JupyterLab
el.addEventListener("contextmenu", (event) => event.stopPropagation());
</script>
</html>
""" # noqa
)
Expand Down

0 comments on commit 1630e2a

Please sign in to comment.