Open Svennte opened 2 weeks ago
Thanks for your proposal!
personally I'm not an expert on html and JS, but I can answer one question
I couldn't find functions that redefine min/max values for the range inputs.
Ranges for all sliders (global brightness, effect sliders) are generally 0..255. The only exception is the "custom3" slider which has a reduced resolution of 0..31.
Ranges for all sliders (global brightness, effect sliders) are generally 0..255. The only exception is the "custom3" slider which has a reduced resolution of 0..31.
Okay, then the inputs are fine. Is there something I have to do now?
Will fix #3019 but I would recommend restoring tabs which were replaced by spaces in JS file.
EDIT: I'd also try to reuse range from existing (hidden) input fields instead of introducing new ones.
Thanks for your recommendations!
> I would recommend restoring tabs which were replaced by spaces in JS file.
Tabs have been restored with the last commit.
> EDIT: I'd also try to reuse range from existing (hidden) input fields instead of introducing new ones.
While this is an interesting idea, I have some concerns about implementation. Here’s my reasoning:
onchange
, oninput
, and possibly other functions. If you have a simpler solution in mind that I may have overlooked, please let me know. Given the required work and the limited benefits, this approach seems impractical, especially since the inputs don’t share the same parent element.
Enhancement: Convert HTML Output Elements to Number Inputs for Improved Precision
Sometimes, I struggled to input specific values using the range sliders for effects and brightness. To improve precision, I changed the HTML output elements for Brightness, Speed, Intensity, and Custom Sliders to number inputs. I kept changes minimal to fit within the current code structure.
Tested with
0_15
esp32dev
What Have I Changed
index.html
this.value
as an argument for the Effects/Brightness setter functions.index.css
.sliderbubble
class to.sliderInput
and adjusted styles accordingly..sliderwrap
class width to display the number input properly.index.js
val
as an argument for the Effects/Brightness setter functions, allowing both range and number inputs to function.updateTrail
to update the input instead of the output.slider bubble
event.toggleBubble
function.Issues
Questions
I couldn't find functions that redefine min/max values for the range inputs. Is this correct, or is there something specific to handle min/max values that I may have overlooked?
Android Firefox WLED-Native WLED-Standard Windows Chrome Firefox Invalid value