Skip to content

Commit

Permalink
fix: support for notebook 7
Browse files Browse the repository at this point in the history
Notebook 7 requires a different way to detect if the app runs in
a notebook context.
  • Loading branch information
mariobuikhuizen committed Sep 4, 2023
1 parent 1577249 commit e9906ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ Bug Fixes

- Fixes tracebacks from plugins opened in popout windows. [#2411]

- Fixes app not displaying properly in Notebook 7. [#2420]

Cubeviz
^^^^^^^

Expand Down
3 changes: 2 additions & 1 deletion jdaviz/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ export default {
methods: {
checkNotebookContext() {
this.notebook_context = document.getElementById("ipython-main-app")
|| document.querySelector('.jp-LabShell');
|| document.querySelector('.jp-LabShell')
|| document.querySelector(".lm-Widget#main"); /* Notebook 7 */
return this.notebook_context;
},
trayItemVisible(trayItem, tray_items_filter) {
Expand Down

0 comments on commit e9906ea

Please sign in to comment.