Browse Source

wrap all sequence residues in zero-width chars for proper line breaks

Alexander Rose 5 years ago
parent
commit
1ca91f35e2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/mol-plugin-ui/sequence/sequence.tsx

+ 1 - 1
src/mol-plugin-ui/sequence/sequence.tsx

@@ -163,7 +163,7 @@ export class Sequence<P extends SequenceProps> extends PluginUIComponent<P> {
     }
 
     private residue(seqIdx: number, label: string, marker: number) {
-        return <span key={seqIdx} data-seqid={seqIdx} style={{ backgroundColor: this.getBackgroundColor(marker) }} className={this.getResidueClass(seqIdx, label)}>{label.length > 1 ? `\u200b${label}\u200b` : label}</span>;
+        return <span key={seqIdx} data-seqid={seqIdx} style={{ backgroundColor: this.getBackgroundColor(marker) }} className={this.getResidueClass(seqIdx, label)}>{`\u200b${label}\u200b`}</span>;
     }
 
     private getSequenceNumberClass(seqIdx: number, seqNum: string, label: string) {