Skip to content

Commit

Permalink
factor config-file loading into a separate method, and call it first …
Browse files Browse the repository at this point in the history
…during initialization
  • Loading branch information
rbuels committed Mar 6, 2012
1 parent 8fb03cb commit b8a4b60
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions js/Browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ var Browser = function(params) {
};

Browser.prototype.initialize = function() {

this.loadConfig();

//set up top nav/overview pane and main GenomeView pane
dojo.addClass(document.body, "tundra");
this.container = dojo.byId(this.params.containerID);
Expand Down Expand Up @@ -94,6 +97,12 @@ Browser.prototype.initialize = function() {
function(o) {
brwsr.addRefseqs(o);
});
};

// load our configuration files based on the parameters the
// constructor was passed
Browser.prototype.loadConfig = function () {
var brwsr = this;

// load any configuration files we've been passed
if( typeof this.params.config != 'object' || !this.params.config.length )
Expand Down

0 comments on commit b8a4b60

Please sign in to comment.