Skip to content

Commit

Permalink
cleanup constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazy-poet committed Jul 23, 2023
1 parent 7adea3e commit b1e3e89
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions public/js/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,25 @@ import AlignmentExporter from './alignment_exporter';
class Report extends Component {
constructor(props) {
super(props);
this.fetchResults();
this.init();
this.getDatabaseListString = this.getDatabaseListString.bind(this);
this.toggleShowDatabases = this.toggleShowDatabases.bind(this);
this.renderToggleDatabasesList = this.renderToggleDatabasesList.bind(this);
this.maxDatabasesStringLength = 200;
this.prepareAlignmentOfSelectedHits = this.prepareAlignmentOfSelectedHits.bind(this);
this.prepareAlignmentOfAllHits = this.prepareAlignmentOfAllHits.bind(this);
this.setStateFromJSON = this.setStateFromJSON.bind(this);
}

init(){
this.fetchResults();
// Properties below are internal state used to render results in small
// slices (see updateState).
this.numUpdates = 0;
this.nextQuery = 0;
this.nextHit = 0;
this.nextHSP = 0;
this.maxHSPs = 3; // max HSPs to render in a cycle
this.maxDatabasesStringLength = 200;
this.state = {
search_id: '',
seqserv_version: '',
Expand All @@ -50,10 +56,8 @@ class Report extends Component {
allQueriesLoaded: false,
cloud_sharing_enabled: false,
};
this.prepareAlignmentOfSelectedHits = this.prepareAlignmentOfSelectedHits.bind(this);
this.prepareAlignmentOfAllHits = this.prepareAlignmentOfAllHits.bind(this);
this.setStateFromJSON = this.setStateFromJSON.bind(this);
}

/**
* Fetch results.
*/
Expand Down
Loading

0 comments on commit b1e3e89

Please sign in to comment.