From 0c1e96c199393ed06806be240775082ba0531b7f Mon Sep 17 00:00:00 2001 From: Eric Fontaine Date: Wed, 21 Jul 2021 00:52:36 -0400 Subject: [PATCH] updateConfig when move slider too onchange only would trigger updateConfig when user releases the mouse from sliders. Adding oninput also allows updateConfig when dragging the sliders, which is nice cause user gets immediate feedback of the changes. --- index_other.h | 1 + index_ov2640.h | 1 + index_ov3660.h | 1 + 3 files changed, 3 insertions(+) diff --git a/index_other.h b/index_other.h index 71b6971..84f7a64 100644 --- a/index_other.h +++ b/index_other.h @@ -257,6 +257,7 @@ const uint8_t index_simple_html[] = R"=====( .querySelectorAll('.action-setting') .forEach(el => { el.onchange = () => updateConfig(el) + el.oninput = () => updateConfig(el) }) // Custom actions diff --git a/index_ov2640.h b/index_ov2640.h index 00724cf..94fbbaa 100644 --- a/index_ov2640.h +++ b/index_ov2640.h @@ -497,6 +497,7 @@ const uint8_t index_ov2640_html[] = R"=====( .querySelectorAll('.default-action') .forEach(el => { el.onchange = () => updateConfig(el) + el.oninput = () => updateConfig(el) }) // Custom actions diff --git a/index_ov3660.h b/index_ov3660.h index ff4b88d..9a30157 100644 --- a/index_ov3660.h +++ b/index_ov3660.h @@ -509,6 +509,7 @@ const uint8_t index_ov3660_html[] = R"=====( .querySelectorAll('.default-action') .forEach(el => { el.onchange = () => updateConfig(el) + el.oninput = () => updateConfig(el) }) // Custom actions