File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed
Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 8989 < style type ="text/css ">
9090
9191 .selected_button {
92- background-color : # 365f9c ;
93- color : # fff ;
94-
92+ background-color : # 365f9c !important ;
93+ color : # fff !important ;
9594 }
9695 .item_head {
9796 margin : 0.2rem ;
Original file line number Diff line number Diff line change @@ -1170,22 +1170,32 @@ let prevLabel = false
11701170 "color" : "#FF0000"
11711171 }
11721172
1173- function setActiveVisual ( x ) {
1173+ function setActiveVisual ( title ) {
1174+ // unselect any which may be active
1175+ const oldSelection = document . getElementsByClassName ( "selected_button" ) ;
1176+ for ( let x of oldSelection ) {
1177+ x . classList . remove ( "selected_button" )
1178+ }
1179+ // select the correct one
1180+ const newSelection = document . querySelectorAll ( '[title="' + title + '"]' ) ;
1181+ for ( let x of newSelection ) {
1182+ x . parentElement . classList . add ( "selected_button" )
1183+ }
11741184
11751185 }
11761186
11771187 function labelTumor ( e ) {
1178- console . log ( e )
1188+ setActiveVisual ( "Tumor" ) ;
11791189 startLabeling ( tumorLabel )
11801190 }
11811191
11821192 function labelStroma ( ) {
1183- console . log ( e )
1193+ setActiveVisual ( "Stroma" ) ;
11841194 startLabeling ( stromaLabel )
11851195 }
11861196
11871197 function labelLymph ( ) {
1188- console . log ( e )
1198+ setActiveVisual ( "Lymph" ) ;
11891199 startLabeling ( lymphLabel )
11901200 }
11911201
You can’t perform that action at this time.
0 commit comments