Skip to content

Commit

Permalink
updateConfig when move sliders too
Browse files Browse the repository at this point in the history
onchange only would trigger updateConfig when user releases the mouse from sliders. Adding oninput also allows updateConfig when dragging the sliders, which provides immediate feedback of the changes for the user.
  • Loading branch information
ericfont committed Jul 21, 2021
1 parent 3ba9e81 commit dc47637
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index_other.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,15 @@ const uint8_t index_simple_html[] = R"=====(<!doctype html>
// Attach default on change action
document
.querySelectorAll('.action-setting')
.querySelectorAll('.default-action')
.forEach(el => {
el.onchange = () => updateConfig(el)
})
document
.querySelectorAll('input[type="range"]')
.forEach(el => {
el.oninput = () => updateConfig(el)
})
// Custom actions
// Detection and framesize
Expand Down
5 changes: 5 additions & 0 deletions index_ov2640.h
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,11 @@ const uint8_t index_ov2640_html[] = R"=====(<!doctype html>
.forEach(el => {
el.onchange = () => updateConfig(el)
})
document
.querySelectorAll('input[type="range"]')
.forEach(el => {
el.oninput = () => updateConfig(el)
})

// Custom actions
// Gain
Expand Down
5 changes: 5 additions & 0 deletions index_ov3660.h
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,11 @@ const uint8_t index_ov3660_html[] = R"=====(<!doctype html>
.forEach(el => {
el.onchange = () => updateConfig(el)
})
document
.querySelectorAll('input[type="range"]')
.forEach(el => {
el.oninput = () => updateConfig(el)
})

// Custom actions
// Gain
Expand Down

0 comments on commit dc47637

Please sign in to comment.