Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #18 from unipept/fix/update
Browse files Browse the repository at this point in the history
Delay rerendering of sunburst
  • Loading branch information
pverscha authored Feb 10, 2023
2 parents 9dbe300 + 938246e commit e25fed5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/cards/analysis/multi/AnalysisSummaryCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,9 @@ const dirty = () => {
const reprocess = () => {
if(dirty()) {
multiAnalysisStore.analyse(
multiAnalysisStore.activeAssayStatus?.assay!,
equateIl.value, filterDuplicates.value, cleavageHandling.value
)
const active = multiAnalysisStore.activeAssayStatus?.assay!;
multiAnalysisStore.resetAssay(active);
multiAnalysisStore.analyse(active, equateIl.value, filterDuplicates.value, cleavageHandling.value)
}
}
Expand Down
21 changes: 21 additions & 0 deletions src/stores/MultiAnalysisStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,26 @@ const useMultiAnalysis = defineStore('multi-analysis', () => {
}
}

const resetAssay = (assay: Assay) => {
const assayIndex = findAssayIndex(assay.id);

if(assayIndex !== -1) {
const filterProgress = ProgressUtils.constructProgressObject(filterSteps);
filterProgress.currentStep = FilterSteps.COMPLETED;

assayStatuses.value[assayIndex] = {
assay: assay,

progress: ProgressUtils.constructProgressObject(progressSteps),
filterProgress: filterProgress
} as MultiProteomicsAnalysisStatus

if (activeAssayStatus.value?.assay.id === assay.id) {
activeAssayStatus.value = assayStatuses.value[assayIndex];
}
}
}

const removeAssay = (assay: Assay) => {
const index = findAssayIndex(assay.id);

Expand Down Expand Up @@ -409,6 +429,7 @@ const useMultiAnalysis = defineStore('multi-analysis', () => {
analysisCompleted,

addAssay,
resetAssay,
removeAssay,
removeAllAssays,
activateAssay,
Expand Down

0 comments on commit e25fed5

Please sign in to comment.