Skip to content

Commit

Permalink
bugfix + adding loading overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
cleaaum committed Oct 12, 2023
1 parent db5b0fb commit 43ee9d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 0 additions & 3 deletions callbacks/control_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@ def annotation_mode(
if generate_modal_opened or any(edit_modal_opened):
# user is going to type on this page (on a modal) and we don't want to trigger this callback using keys
raise PreventUpdate
# if the image is loading stop the callback when keybinds are pressed
if figure_overlay_z_index != -1:
raise PreventUpdate

trigger = ctx.triggered_id
pressed_key = (
Expand Down
9 changes: 6 additions & 3 deletions callbacks/image_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,12 @@ def render_image(
update_slider_value = dash.no_update
notification = dash.no_update
if ctx.triggered_id == "annotated-slices-selector":
reset_slice_selection = None
if image_idx == slice_selection:
raise PreventUpdate
ret_values = [dash.no_update] * 8
ret_values[5] = reset_slice_selection
return ret_values
image_idx = slice_selection
reset_slice_selection = None
update_slider_value = slice_selection
notification = generate_notification(
f"{ANNOT_NOTIFICATION_MSGS['slice-jump']} {image_idx}",
Expand Down Expand Up @@ -309,13 +311,14 @@ def update_viewfinder(relayout_data, annotation_store):

clientside_callback(
"""
function EnableImageLoadingOverlay(zIndexSlider,zIndexToggle) {
function EnableImageLoadingOverlay(zIndexSlider,zIndexToggle,zIndexSliceSelector) {
return 9999;
}
""",
Output("image-viewer-loading", "zIndex"),
Input("image-selection-slider", "value"),
Input("show-result-overlay-toggle", "checked"),
Input("annotated-slices-selector", "value"),
)


Expand Down

0 comments on commit 43ee9d1

Please sign in to comment.