File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " react-sequence-viewer" ,
3- "version" : " 0.1.3 " ,
3+ "version" : " 0.1.4 " ,
44 "description" : " A React wrapper around the BioJS sequence-viewer component" ,
55 "main" : " lib/index.js" ,
66 "jsnext:main" : " es/index.js" ,
Original file line number Diff line number Diff line change @@ -31,16 +31,16 @@ export default class ReactSequenceViewer extends Component {
3131 //Render div if it is not null.
3232 if ( div !== null ) {
3333 this . _seqObj . render ( '#' + div . id , { ...props , ...newProps } ) ;
34- this . _seqObj . coverage ( this . props . coverage ) ;
35- this . _seqObj . addLegend ( this . props . legend ) ;
34+ if ( this . props . coverage . length > 0 ) this . _seqObj . coverage ( this . props . coverage ) ;
35+ if ( this . props . legend . length > 0 ) this . _seqObj . addLegend ( this . props . legend ) ;
3636 if ( selection . length > 0 ) this . _seqObj . selection ( ...selection ) ;
3737 }
3838 }
3939
4040 // When the component mounts, add a change listenver to the document
4141 // and call render. We attach the change listener here becuase
42- // jQuery events don't see to bubble up through React properly.
43- // Thus, when a user toggles the charsPerLine drop down menu.
42+ // jQuery events don't bubble up through React due to its synthetic event
43+ // handling. Thus, when a user toggles the charsPerLine drop down menu.
4444 // the event is handled by jQuery, but not seen by React when the
4545 // listener is attached at the component div level.
4646 // Attaching it to the document seems to work.
You can’t perform that action at this time.
0 commit comments