File tree 2 files changed +21
-1
lines changed
2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 61
61
padding-right : 5px ;
62
62
}
63
63
64
- .neuroglancer-annotation-description {
64
+ .neuroglancer-annotation-description , . neuroglancer-annotation-tags {
65
65
grid-column : dim / -1 ;
66
66
text-overflow : ellipsis;
67
67
overflow : hidden;
Original file line number Diff line number Diff line change @@ -936,6 +936,26 @@ export class AnnotationLayerView extends Tab {
936
936
description . textContent = annotation . description ;
937
937
element . appendChild ( description ) ;
938
938
}
939
+ const {
940
+ properties : { value : properties } ,
941
+ } = state . source ;
942
+ const activeTags : string [ ] = [ ] ;
943
+ for ( let i = 0 , count = properties . length ; i < count ; ++ i ) {
944
+ const property = properties [ i ] ;
945
+ const value = annotation . properties [ i ] ;
946
+ activeTags ;
947
+ if ( isAnnotationTagPropertySpec ( property ) && property . tag ) {
948
+ if ( value !== 0 ) {
949
+ activeTags . push ( property . tag ) ;
950
+ }
951
+ }
952
+ }
953
+ if ( activeTags . length ) {
954
+ const tags = document . createElement ( "div" ) ;
955
+ tags . classList . add ( "neuroglancer-annotation-tags" ) ;
956
+ tags . textContent = activeTags . map ( ( x ) => `#${ x } ` ) . join ( " " ) ;
957
+ element . appendChild ( tags ) ;
958
+ }
939
959
icon . style . gridRow = `span ${ numRows } ` ;
940
960
if ( deleteButton !== undefined ) {
941
961
deleteButton . style . gridRow = `span ${ numRows } ` ;
You can’t perform that action at this time.
0 commit comments