monkeymademe / picamera2-WebUI

This is a WebUI for the Picamera2 Library for the Raspberry Pi
MIT License
141 stars 18 forks source link

Reduce the adjust setting functions #2

Closed monkeymademe closed 8 months ago

monkeymademe commented 8 months ago

I have way too many adjust setting functions in JS for the camerasettings.html

Its possible considering the HTML elements are all the same structure with key ID's as setting names, its possible to pass the setting name to a generic adjust setting function that would deal with the value and apply accordingly.

If I want to have some validation in for example in the input boxes it would likely be better to deal with the 4 main types of adjustments to deal with the UI elements accordingly.

adjustflip would be an exception because its a little mixed in the UI elements at the moment.

monkeymademe commented 8 months ago

Done!