@@ -32,7 +32,7 @@ function showDetails(data, connected) {
3232 details_bottom . innerHTML += "<h3 class='mt-3'>List of simulators</h2>" ;
3333 for ( const sim of SIMULATORS ) {
3434 const quoted_sim = `[id='${ sim } ']` ;
35- details_bottom . innerHTML += `<button class='btn btn-secondary m-1' onclick="cy.nodes('#simulators').unselect(); let node = cy.nodes('${ quoted_sim . replace ( / ' / g, "\\'" ) } '); node.select(); showNodeDetails(node);">${ TOOL_DESCRIPTIONS [ sim ] . short_name } </button>` ;
35+ details_bottom . innerHTML += `<button class='btn btn-secondary m-1' onclick="cy.nodes().selectify(); cy.nodes( '#simulators').unselect(); let node = cy.nodes('${ quoted_sim . replace ( / ' / g, "\\'" ) } '); node.select(); cy.nodes().unselectify (); showNodeDetails(node);">${ TOOL_DESCRIPTIONS [ sim ] . short_name } </button>` ;
3636 }
3737 details_bottom . innerHTML += "</div>" ;
3838 window . history . pushState ( { } , "" , window . location . href . split ( "?" ) [ 0 ] ) ;
@@ -84,8 +84,11 @@ function showDetails(data, connected) {
8484 }
8585 targetLink . addEventListener ( "click" , function ( e ) {
8686 console . log ( "Clicked on " + targetLink . innerHTML ) ;
87- cy . nodes ( "[id='" + data . id + "']" ) . unselect ( ) ;
87+ cy . nodes ( ) . selectify ( ) ;
88+ cy . nodes ( ":selected" ) . unselect ( ) ;
8889 cy . nodes ( "[id='" + targetLink . innerHTML + "']" ) . select ( ) ;
90+ showNodeDetails ( cy . nodes ( "[id='" + targetLink . innerHTML + "']" ) ) ;
91+ cy . nodes ( ) . unselectify ( ) ;
8992 } ) ;
9093 targetLink . innerHTML = targetId ;
9194 const simName = document . createElement ( "i" ) ;
@@ -133,7 +136,7 @@ function showDetails(data, connected) {
133136 <path d="M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466"/>
134137 </svg> Back to simulators` ;
135138 back_button . classList . add ( "btn" , "btn-secondary" ) ;
136- back_button . onclick = function ( ) { cy . nodes ( `[id = '${ data . id } ']` ) . unselect ( ) ; cy . nodes ( "#simulators" ) . select ( ) ; unhighlightNode ( ) ; } ;
139+ back_button . onclick = function ( ) { cy . nodes ( ) . selectify ( ) ; cy . nodes ( `[id = '${ data . id } ']` ) . unselect ( ) ; cy . nodes ( "#simulators" ) . select ( ) ; cy . nodes ( ) . unselectify ( ) ; unhighlightNode ( null , true ) ; } ;
137140 back_p . appendChild ( back_button ) ;
138141 details_bottom . appendChild ( back_p ) ;
139142 // Edit footer
0 commit comments