Skip to content

Commit 434ef1a

Browse files
sync embedded/arc_tz_temp_humid from arc_tz_temp_humid
1 parent cea733e commit 434ef1a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

embedded/arc_tz_temp_humid/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,7 @@ <h1 data-i18n="title">ARC Tanzania - Temperature &amp; Humidity Graphs</h1>
20192019
lbl.innerHTML = `<input type="checkbox" data-logger-id="${id}" ${stateSet.has(id) ? 'checked' : ''}> <span style="display:inline-block;width:10px;height:10px;border-radius:2px;background:${m.colors[id]};vertical-align:middle"></span> <span class="logger-name" data-lid="${id}">${ln(id)}</span>${meteoSuffix(id)}${omniSuffix(m.loggerSources[id] || '')}${extraLabel || ''}${anomSuffix}`;
20202020
lbl.querySelector('input').addEventListener('change', e => {
20212021
e.target.checked ? stateSet.add(id) : stateSet.delete(id);
2022-
updatePlot();
2022+
if (state.timeMode === 'all') _zoomReset = true; updatePlot();
20232023
});
20242024
if (hasAnom) {
20252025
const warn = lbl.querySelector('.anomalous-warn');
@@ -2049,12 +2049,12 @@ <h1 data-i18n="title">ARC Tanzania - Temperature &amp; Humidity Graphs</h1>
20492049
btnRow.appendChild(mkSelBtn(t('btnAll'), () => {
20502050
ids.forEach(id => { stateSet.add(id); container.querySelector(`input[data-logger-id="${id}"]`).checked = true; });
20512051
if (sectionKey) { state.showSectionAvg[sectionKey] = true; const cb = container.querySelector(`input[data-section-avg="${sectionKey}"]`); if (cb) cb.checked = true; }
2052-
updatePlot();
2052+
if (state.timeMode === 'all') _zoomReset = true; updatePlot();
20532053
}, 'btnAll'));
20542054
btnRow.appendChild(mkSelBtn(t('btnNone'), () => {
20552055
ids.forEach(id => { stateSet.delete(id); container.querySelector(`input[data-logger-id="${id}"]`).checked = false; });
20562056
if (sectionKey) { state.showSectionAvg[sectionKey] = false; const cb = container.querySelector(`input[data-section-avg="${sectionKey}"]`); if (cb) cb.checked = false; }
2057-
updatePlot();
2057+
if (state.timeMode === 'all') _zoomReset = true; updatePlot();
20582058
}, 'btnNone'));
20592059
if (sectionKey) {
20602060
const lockBtn = document.createElement('button');
@@ -2092,8 +2092,8 @@ <h1 data-i18n="title">ARC Tanzania - Temperature &amp; Humidity Graphs</h1>
20922092
const hasOS = ids.some(id => m.loggerSources[id] === 'Omnisense');
20932093
if (!hasTT || !hasOS) return null;
20942094
return [
2095-
mkSelBtn('TinyTag', () => { ids.forEach(id => { const is = m.loggerSources[id]==='TinyTag'; is ? stateSet.add(id) : stateSet.delete(id); container.querySelector(`input[data-logger-id="${id}"]`).checked = is; }); updatePlot(); }),
2096-
mkSelBtn('Omnisense',() => { ids.forEach(id => { const is = m.loggerSources[id]==='Omnisense'; is ? stateSet.add(id) : stateSet.delete(id); container.querySelector(`input[data-logger-id="${id}"]`).checked = is; }); updatePlot(); }),
2095+
mkSelBtn('TinyTag', () => { ids.forEach(id => { const is = m.loggerSources[id]==='TinyTag'; is ? stateSet.add(id) : stateSet.delete(id); container.querySelector(`input[data-logger-id="${id}"]`).checked = is; }); if (state.timeMode === 'all') _zoomReset = true; updatePlot(); }),
2096+
mkSelBtn('Omnisense',() => { ids.forEach(id => { const is = m.loggerSources[id]==='Omnisense'; is ? stateSet.add(id) : stateSet.delete(id); container.querySelector(`input[data-logger-id="${id}"]`).checked = is; }); if (state.timeMode === 'all') _zoomReset = true; updatePlot(); }),
20972097
];
20982098
}
20992099
const extSet = new Set(m.externalLoggers || []);

0 commit comments

Comments
 (0)