Commit 9125d5ba authored by Lukas Pravda's avatar Lukas Pravda
Browse files

change the way node labels are made

parent 13fdbeaa
......@@ -620,7 +620,7 @@ class Visualization {
.style('text-anchor', 'middle')
.style('dominant-baseline', 'central')
.each(function (e: Model.InteractionNode) {
let labels = [e.residue.chemCompId, `${e.residue.chainId} ${e.residue.authorResidueNumber}`];
let labels = [e.residue.chemCompId, e.residue.authorResidueNumber];
for (let i = 0; i < labels.length; i++) {
d3.select(this)
.append('tspan')
......
......@@ -149,7 +149,18 @@ namespace Model {
}
public toString(): string {
return `${this.residue.chemCompId} ${this.residue.chainId} ${this.residue.authorResidueNumber}${this.residue.authorInsertionCode}`;
let r = this.residue;
let splitted = r.chainId.split('_');
let chainStr = splitted[0];
let symString = "";
if (splitted.length > 1) {
symString = splitted[1] !== "1"? `[${splitted[1]}]` : "";
}
let str = `${r.chemCompId} | ${chainStr}${symString} | ${r.authorResidueNumber}${r.authorInsertionCode}`;
return str;
}
public toTooltip(): string {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment