mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-07-05 05:38:54 +00:00
Revert "Merge branch 'main' into 30-add-dmx-in-capability"
This reverts commitb93ae3d682
, reversing changes made tof3ef3aa9b9
.
This commit is contained in:
parent
b93ae3d682
commit
176a12a9b3
5 changed files with 6 additions and 53 deletions
|
@ -7,11 +7,11 @@
|
|||
<link rel="stylesheet" href="/style.css" />
|
||||
<script type="module" src="/input-visibility.js" defer></script>
|
||||
<script type="module" src="/loading-screen.js" defer></script>
|
||||
<script type="module" src="/range-input.js" defer></script>
|
||||
<script type="module" src="/load-data.js" defer></script>
|
||||
<script type="module" src="/networks.js" defer></script>
|
||||
<script type="module" src="/submit.js" defer></script>
|
||||
<script type="module" src="/reset.js" defer></script>
|
||||
<script type="module" src="/range-input.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
|
|
|
@ -1,20 +1,14 @@
|
|||
const form = document.querySelector("form");
|
||||
|
||||
form.addEventListener("input", (event) => {
|
||||
document.querySelector("form").addEventListener("input", (event) => {
|
||||
if (event.target.classList.contains("range")) {
|
||||
updateValue(event.target);
|
||||
}
|
||||
});
|
||||
|
||||
form.addEventListener("change", () => {
|
||||
console.log("received change event");
|
||||
document.querySelectorAll("input[type='range']").forEach((input) => {
|
||||
updateValue(input);
|
||||
});
|
||||
});
|
||||
|
||||
function updateValue(slider) {
|
||||
console.log("update slide value");
|
||||
const percentage = Math.round((slider.value / slider.max) * 100);
|
||||
slider.nextElementSibling.innerText = `${percentage}%`;
|
||||
}
|
||||
|
||||
document.querySelectorAll("input[type='range'].range").forEach((element) => {
|
||||
updateValue(element);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue