summaryrefslogtreecommitdiffstats
path: root/nucleotide.mjs
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2021-02-06 13:41:35 -0500
committerBrian Cully <bjc@kublai.com>2021-02-06 13:41:35 -0500
commit256fd05e012d5825a50368878d1c7f1c8feabfd8 (patch)
tree30148dd19b677af1ef8e25af9adc05b5145e1d9d /nucleotide.mjs
parent8ebcbad47d84d01ed441af7cbd2b8568098ecbaa (diff)
downloadmolsim-main.tar.gz
molsim-main.zip
whitespaceHEADmain
Diffstat (limited to 'nucleotide.mjs')
-rw-r--r--nucleotide.mjs38
1 files changed, 19 insertions, 19 deletions
diff --git a/nucleotide.mjs b/nucleotide.mjs
index e646efc..13ed1b6 100644
--- a/nucleotide.mjs
+++ b/nucleotide.mjs
@@ -7,46 +7,46 @@ class Nucleotide {
}
get elt() {
- if (this._elt === undefined) {
- this._elt = document.createElement('li')
- this._elt.classList.add('nucleotide')
- }
- return this._elt
+ if (this._elt === undefined) {
+ this._elt = document.createElement('li')
+ this._elt.classList.add('nucleotide')
+ }
+ return this._elt
}
get valueElt() {
- if (this._valueElt === undefined) {
- this._valueElt = document.createElement('span')
- this.elt.appendChild(this._valueElt)
- }
- return this._valueElt
+ if (this._valueElt === undefined) {
+ this._valueElt = document.createElement('span')
+ this.elt.appendChild(this._valueElt)
+ }
+ return this._valueElt
}
get value() {
- return this.valueElt.innerText
+ return this.valueElt.innerText
}
set value(val) {
- this.valueElt.innerText = val
+ this.valueElt.innerText = val
}
get onClick() {
- if (this._onClick !== undefined) {
- return this._onClick
- }
- return () => {}
+ if (this._onClick !== undefined) {
+ return this._onClick
+ }
+ return () => {}
}
set onClick(fn) {
- this._onClick = fn
+ this._onClick = fn
}
lock() {
- this.elt.removeEventListener('click', this._boundClickHandler)
+ this.elt.removeEventListener('click', this._boundClickHandler)
}
unlock() {
- this.elt.addEventListener('click', this._boundClickHandler)
+ this.elt.addEventListener('click', this._boundClickHandler)
}
select() {