blob: 0008ce8867e362ef3fe4d447c4bc51916f5c6c21 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
class GenomeList {
constructor(elt) {
this.genomes = [];
this.elt = elt;
}
push(genome) {
this.genomes.push(genome)
this.elt.appendChild(genome.elt)
window.genome = genome
console.log('scrolling into vuew', genome.elt)
genome.elt.scrollIntoView(false)
}
get last() {
if (this.genomes.length > 0) {
return this.genomes[this.genomes.length - 1]
} else {
return undefined
}
}
}
export default GenomeList
|