Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion wled00/data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2848,7 +2848,20 @@ function mergeDeep(target, ...sources)
}
return mergeDeep(target, ...sources);
}

//Call this on what ever page you want to activate opening a dialog on double click on range sliders.
//You can also filter when to call it (activate the functionality) on other things, like device type or setting.
function actDblC(){
const rngSlds = d.querySelectorAll('input[type="range"]');
rngSlds.forEach(sld => {
sld.addEventListener("dblclick", () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional indent needed for cleaner code.

const nVal = prompt(`New value (${sld.min}-${sld.max}):`);
if (nVal !== null) {
sld.value = nVal;
sld.dispatchEvent(new Event("change"));
}
});
});
}
size();
_C.style.setProperty('--n', N);

Expand Down