Skip to content

Commit

Permalink
Fix visualisation when there is no stable extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daphne Odekerken committed Apr 22, 2024
1 parent 2fb1979 commit 982faa2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/py_arg_visualisation/pages/21_visualise_abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,12 +433,10 @@ def evaluate_abstract_argumentation_framework(arguments: str, attacks: str,
Input({'type': 'argument-button-abstract', 'index': ALL}, 'n_clicks'),
Input('abstract-arguments', 'value'),
Input('abstract-attacks', 'value'),
State('selected-argument-store-abstract', 'data'),
)
def mark_extension_or_argument_in_graph(_nr_of_clicks_extension_values,
_nr_of_clicks_argument_values,
_arguments, _attacks,
old_selected_data: List[str]):
_arguments, _attacks):
# Remove stored selected arguments after any updates in arguments/attacks.
if dash.ctx.triggered_id in ['abstract-arguments', 'abstract-attacks']:
return []
Expand All @@ -449,7 +447,7 @@ def mark_extension_or_argument_in_graph(_nr_of_clicks_extension_values,

# No triggered button, keep old selection.
if button_clicked_id == '':
return old_selected_data
return []

# Update selected argument based on the clicked button.
button_clicked_id_content = json.loads(button_clicked_id)
Expand Down

0 comments on commit 982faa2

Please sign in to comment.