Skip to content

Commit

Permalink
Fix #307 with an optional config parameter organismMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoNekoru committed Jul 22, 2022
1 parent e805cf7 commit 36e8d2c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/js/ideogram.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/ideogram.min.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/js/init/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ function configureSingleChromosome(config, ideo) {
}
}

function configureOrganisms(ideo) {
function configureOrganisms(config, ideo) {
ideo.organisms = Object.assign({}, organismMetadata);
ideo.organismsWithBands = Object.assign({}, ideo.organisms);
if (config.taxid && config.organismMetadata) ideo.organisms[config.taxid] = config.organismMetadata
ideo.organismsWithBands = Object.assign({}, organismMetadata);
}

function configureCallbacks(config, ideo) {
Expand Down Expand Up @@ -183,7 +184,7 @@ function configure(config) {
configureWidth(this);
configureMargin(this);
configureCallbacks(config, this);
configureOrganisms(this);
configureOrganisms(config, this);
configureBump(this);
configureSingleChromosome(config, this);
configureTextStyle(this);
Expand Down

0 comments on commit 36e8d2c

Please sign in to comment.