File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,11 @@ export function filterContainers() {
55 let spanText = containers [ i ] . querySelector ( 'span' ) . innerHTML ;
66 if ( spanText . indexOf ( filterValue ) >= 0 ) {
77 containers [ i ] . classList . remove ( 'hide' ) ;
8+ containers [ i ] . classList . add ( 'show' ) ;
89 }
910 else {
1011 containers [ i ] . classList . add ( 'hide' ) ;
12+ containers [ i ] . classList . remove ( 'show' ) ;
1113 }
1214 }
1315}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ let filterInput = filterDiv.append('input')
2222 . attr ( 'id' , 'filter' )
2323 . attr ( 'placeholder' , 'filter containers' ) ;
2424
25- filterInput . addEventListener ( 'keyup' , filterContainers ) ;
25+ filterInput . on ( 'keyup' , filterContainers ) ;
2626
2727function removeVis ( ) {
2828 cluster = wrapper . selectAll ( '.node-cluster' )
Original file line number Diff line number Diff line change 218218 }
219219}
220220
221+ @keyframes hide {
222+ 0% { opacity : 1 ; transform : scale (1 ); max-height : 500px ; }
223+ 100% { opacity : 0 ; transform : scale (0 ); max-height : 0 ; }
224+ }
225+
226+ @keyframes show {
227+ 0% { opacity : 0 ; transform : scale (0 ); max-height : 0 ; }
228+ 100% { opacity : 1 ; transform : scale (1 ); max-height : 500px ; }
229+ }
230+
221231.hide {
222- display : none ;
232+ animation : hide .5s forwards ;
233+ }
234+
235+ .show {
236+ animation : show .5s forwards ;
223237}
You can’t perform that action at this time.
0 commit comments