10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-10-02 22:40:59 +02:00

Use getAllData in multipledataset

This commit is contained in:
Mickaël Véril 2020-05-24 18:49:16 +02:00
parent 92c2f31606
commit f491488863

View File

@ -97,12 +97,9 @@ draft: false
async function loadFiles() { async function loadFiles() {
processingIndicator.isActive = true processingIndicator.isActive = true
var chks = [] var chks = []
proms = [] var data= await loadAllData()
proms.push(getAbsFilesName().map((f) => VertDataFile.loadAsync(f, VertExcitationKinds.Absorbtion)));
proms.push(getFluoFilesName().map((f) => VertDataFile.loadAsync(f, VertExcitationKinds.Fluorescence)))
window.defaultDats = [] window.defaultDats = []
for (const subproms of proms) { for (const sub of Object.values(data)) {
const sub = await Promise.all(subproms)
for (const doi of uniq(sub.map(d => d.DOI.string))) { for (const doi of uniq(sub.map(d => d.DOI.string))) {
const subdoi = sub.filter(d => d.DOI.string === doi) const subdoi = sub.filter(d => d.DOI.string === doi)
for (mol of uniq(subdoi.map(d => d.molecule))) { for (mol of uniq(subdoi.map(d => d.molecule))) {