speed up ui updating
This commit is contained in:
parent
afe3817395
commit
22bea2c53d
1 changed files with 8 additions and 10 deletions
|
|
@ -257,17 +257,15 @@ class ROICalculator {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Update UI
|
// Update UI immediately
|
||||||
setTimeout(() => {
|
this.updateSummaryMetrics();
|
||||||
this.updateSummaryMetrics();
|
this.updateCharts();
|
||||||
this.updateCharts();
|
this.updateComparisonTable();
|
||||||
this.updateComparisonTable();
|
this.updateMonthlyBreakdown();
|
||||||
this.updateMonthlyBreakdown();
|
|
||||||
|
|
||||||
// Hide loading spinner
|
// Hide loading spinner
|
||||||
if (loadingSpinner) loadingSpinner.style.display = 'none';
|
if (loadingSpinner) loadingSpinner.style.display = 'none';
|
||||||
if (summaryMetrics) summaryMetrics.style.display = 'flex';
|
if (summaryMetrics) summaryMetrics.style.display = 'flex';
|
||||||
}, 500);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error updating calculations:', error);
|
console.error('Error updating calculations:', error);
|
||||||
// Hide loading spinner on error
|
// Hide loading spinner on error
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue