Cleaning of equitherm function and onChange listener for chart

This commit is contained in:
P43YM
2025-02-28 17:53:01 +03:00
parent 54095892e1
commit ba255c1bd1
2 changed files with 14 additions and 20 deletions

View File

@@ -1143,6 +1143,15 @@
updateChart(formData);
});
//Следим за изменениями в полях
document.querySelectorAll('#equitherm-settings input').forEach(input => {
input.addEventListener('change', () => {
const form = document.getElementById('equitherm-settings');
const formData = new FormData(form);
updateChart(formData);
});
});
// инициализируем
initChart();