diff options
author | Brian Cully <bjc@kublai.com> | 2021-02-19 20:11:23 -0500 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2021-02-19 20:11:23 -0500 |
commit | 6fc5f812561ecd556d185084e2b9a611c5b9ccd8 (patch) | |
tree | 315513fc7585fe1290e01a03320f473f7289a9af /genome.mjs | |
parent | bdf1d88883256c0d2731600d604af22d27d8ee7f (diff) | |
download | molsim2-6fc5f812561ecd556d185084e2b9a611c5b9ccd8.tar.gz molsim2-6fc5f812561ecd556d185084e2b9a611c5b9ccd8.zip |
Add initial/final genome displays
Diffstat (limited to 'genome.mjs')
-rw-r--r-- | genome.mjs | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -4,20 +4,17 @@ import { randomItem } from './utils.mjs' class Genome { constructor(nucleotides) { - const codonList = document.createElement('ol') - this.codons = [] let tmpCodon = [] nucleotides.forEach(base => { tmpCodon.push(base) if (tmpCodon.length == 3) { const c = new Codon(...tmpCodon) - codonList.appendChild(c.elt) + this.elt.appendChild(c.elt) this.codons.push(c) tmpCodon = [] } }) - this.elt.appendChild(codonList) this.lock() this._boundNucleotideClickedHandler = @@ -31,7 +28,7 @@ class Genome { get elt() { if (this._elt === undefined) { - this._elt = document.createElement('li') + this._elt = document.createElement('ol') this._elt.classList.add('genome') } return this._elt |