diff --git a/callbacks/control_bar.py b/callbacks/control_bar.py index 1f35c3b..898f2eb 100644 --- a/callbacks/control_bar.py +++ b/callbacks/control_bar.py @@ -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 = ( diff --git a/callbacks/image_viewer.py b/callbacks/image_viewer.py index 7a2f222..ba004cc 100644 --- a/callbacks/image_viewer.py +++ b/callbacks/image_viewer.py @@ -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}", @@ -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"), )