Skip to content

Commit

Permalink
Biugfix : unselect former elements
Browse files Browse the repository at this point in the history
After 0e233d8 elements are not automatically unselected, we thus have to do it when selecting a new element using `cmd()`
  • Loading branch information
bryan-brancotte authored May 5, 2021
1 parent c6fc07e commit 106d5f9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/tree-edam-stand-alone.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ function interactive_edam_browser(){
}

if(current_branch.startsWith("custom"))
return "<a href=\"#"+ value + "&"+current_branch + "\" onclick=\"browser.interactive_tree().cmd().selectElement(this.text,true);\">"+value+"</a>";
return "<a href=\"#"+ value + "&"+current_branch + "\" onclick=\"browser.interactive_tree().cmd().clearSelectedElements(false);browser.interactive_tree().cmd().selectElement(this.text,true);\">"+value+"</a>";

branch_of_term = get_branch_of_term(value);
var text;
Expand All @@ -420,8 +420,8 @@ function interactive_edam_browser(){
"href=\"#"+ value + (current_branch=="deprecated"?"&deprecated":"")+"\" "+
(
current_branch.startsWith("edam")
?"onclick=\"browser.interactive_tree().cmd().selectElement('"+value+"',true)\""
:"onclick=\"setCookie('edam_browser_'+'"+current_branch+"','"+value+"');browser.current_branch('"+branch_of_term+"');browser.interactive_tree().cmd().selectElement('"+value+"',true)\""
?"onclick=\"browser.interactive_tree().cmd().clearSelectedElements(false);browser.interactive_tree().cmd().selectElement('"+value+"',true)\""
:"onclick=\"setCookie('edam_browser_'+'"+current_branch+"','"+value+"');browser.current_branch('"+branch_of_term+"');browser.interactive_tree().cmd().clearSelectedElements(false);browser.interactive_tree().cmd().selectElement('"+value+"',true)\""
)+
"class=\"label bg-edam-"+branch_of_term+"-light fg-edam-"+branch_of_term+" border-one-solid border-edam-"+branch_of_term+"\" "+
">"+
Expand Down

0 comments on commit 106d5f9

Please sign in to comment.