File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 104
104
background-color : lightsteelblue ;
105
105
}
106
106
107
+ tr .datarow.selected-row {
108
+ background-color : lightsteelblue ;
109
+ }
110
+
107
111
table , th , td {
108
112
border : 1px solid ;
109
113
border-collapse : collapse ;
147
151
<th >Description</th > <!-- Query Description -->
148
152
</tr >
149
153
{% - for query in query_table %}
150
- <tr class =datarow onclick =" vis.setup_query ({{loop.index0}})" onmouseover =" vis.highlight_cfgnode({{query.start_node}})" onmouseout =" vis.unhighlight_cfgnode({{query.start_node}})" >
154
+ <tr id = " query_row{{loop.index0}} " class =datarow onclick =" select_query ({{loop.index0}})" onmouseover =" vis.highlight_cfgnode({{query.start_node}})" onmouseout =" vis.unhighlight_cfgnode({{query.start_node}})" >
151
155
<td >{{query.solver_idx}}</td >
152
156
<td >{{query.from_cache}}</td >
153
157
<td >{{query.shortcircuited}}</td >
Original file line number Diff line number Diff line change 13
13
* more complex than that.
14
14
*/
15
15
16
+ /**
17
+ * Highlights the selected query table row and starts the query.
18
+ * @param {number } query_id the id of the query, corresponding to the row in the
19
+ * query table.
20
+ */
21
+ function select_query ( query_id ) {
22
+ for ( const elem of document . getElementsByClassName ( "datarow" ) ) {
23
+ elem . classList . remove ( "selected-row" ) ;
24
+ }
25
+ document . getElementById ( "query_row" + query_id ) . classList . add ( "selected-row" ) ;
26
+ vis . setup_query ( query_id ) ;
27
+ }
28
+
16
29
/**
17
30
* Visualizer handles manipulating the Cytoscape instance using the pytype
18
31
* program data.
You can’t perform that action at this time.
0 commit comments