Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Melusina
vDHd Volume
burghardt_embed
Commits
6e95d6d4
Commit
6e95d6d4
authored
Jun 11, 2021
by
Bernhard Liebl
Browse files
fix incorrect query tab init in BINDER mode
parent
42b220ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
code/nbutils.py
View file @
6e95d6d4
...
@@ -1044,6 +1044,12 @@ class EmbeddingPlotter:
...
@@ -1044,6 +1044,12 @@ class EmbeddingPlotter:
update_token_plot
()
update_token_plot
()
if
locator
is
not
None
:
if
locator
is
not
None
:
def
set_active_query_tab
(
active
):
if
_display_mode
.
bokeh
:
query_tabs
.
active
=
active
else
:
query_tabs
.
selected_index
=
active
if
isinstance
(
locator
,
str
):
if
isinstance
(
locator
,
str
):
locator
=
(
"free"
,
locator
)
locator
=
(
"free"
,
locator
)
locator_type
,
locator_s
=
locator
locator_type
,
locator_s
=
locator
...
@@ -1051,10 +1057,10 @@ class EmbeddingPlotter:
...
@@ -1051,10 +1057,10 @@ class EmbeddingPlotter:
phrases
=
[
p
.
phrase
for
p
in
self
.
_gold
.
patterns
]
phrases
=
[
p
.
phrase
for
p
in
self
.
_gold
.
patterns
]
intruder_select
.
value
=
phrases
[
find_index_by_filter
(
intruder_select
.
value
=
phrases
[
find_index_by_filter
(
phrases
,
locator_s
)]
phrases
,
locator_s
)]
query_tabs
.
active
=
1
set_active_query_tab
(
1
)
elif
locator_type
==
"free"
:
elif
locator_type
==
"free"
:
intruder_free
.
value
=
locator_s
intruder_free
.
value
=
locator_s
query_tabs
.
active
=
2
set_active_query_tab
(
2
)
else
:
else
:
raise
ValueError
(
locator_type
)
raise
ValueError
(
locator_type
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment