forked from eweitz/ideogram
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate style fixes as part of linting
- Loading branch information
Showing
21 changed files
with
1,074 additions
and
1,413 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,33 @@ | ||
function Color(config) { | ||
// Ideogram config | ||
this._config = config; | ||
this._ploidy = new Ploidy(this._config); | ||
this._config = config; | ||
this._ploidy = new Ploidy(this._config); | ||
} | ||
|
||
|
||
Color.prototype.getArmColor = function(chrSetNumber, chrNmber, armNumber) { | ||
|
||
if (this._config.armColors) { | ||
return this._config.armColors[armNumber]; | ||
} else if (this._config.ancestors) { | ||
return this._getPolyploidArmColor(chrSetNumber, chrNmber, armNumber); | ||
} else { | ||
return null; | ||
} | ||
if (this._config.armColors) { | ||
return this._config.armColors[armNumber]; | ||
} else if (this._config.ancestors) { | ||
return this._getPolyploidArmColor(chrSetNumber, chrNmber, armNumber); | ||
} else { | ||
return null; | ||
} | ||
}; | ||
|
||
|
||
Color.prototype.getBorderColor = function(chrSetNumber, chrNmber, armNumber) { | ||
|
||
if (chrNmber < this._config.ploidy) { | ||
return '#000'; | ||
} else if (this._ploidy.isExists(chrSetNumber, chrNmber, armNumber)) { | ||
return '#000'; | ||
} else { | ||
return '#fff'; | ||
} | ||
if (chrNmber < this._config.ploidy) { | ||
return '#000'; | ||
} else if (this._ploidy.isExists(chrSetNumber, chrNmber, armNumber)) { | ||
return '#000'; | ||
} else { | ||
return '#fff'; | ||
} | ||
}; | ||
|
||
|
||
Color.prototype._getPolyploidArmColor = function(chrSetNumber, chrNmber, armNumber) { | ||
|
||
if (! this._ploidy.isExists(chrSetNumber, chrNmber, armNumber)) { | ||
return 'transparent'; | ||
} else { | ||
return this._config.ancestors[this._ploidy.getAncestor(chrSetNumber, chrNmber, armNumber)]; | ||
} | ||
if (!this._ploidy.isExists(chrSetNumber, chrNmber, armNumber)) { | ||
return 'transparent'; | ||
} else { | ||
return this._config.ancestors[this._ploidy.getAncestor(chrSetNumber, chrNmber, armNumber)]; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.