summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--genome.mjs6
1 files changed, 6 insertions, 0 deletions
diff --git a/genome.mjs b/genome.mjs
index 7550cf6..bb5c09a 100644
--- a/genome.mjs
+++ b/genome.mjs
@@ -43,6 +43,12 @@ class Genome {
}, [])
}
+ get length() {
+ return this.codons.reduce((acc, c) => {
+ return acc + c.bases.length
+ }, 0)
+ }
+
get onNucleotideSelectionChanged() {
if (this._onNucleotideSelectionChanged !== undefined) {
return this._onNucleotideSelectionChanged