thrimbletrimmer: Show/hide transition duration if "cut" is selected

pull/414/head
Mike Lang 2 months ago committed by Mike Lang
parent 5d09115a8a
commit 72110821d5

@ -1439,10 +1439,17 @@ function rangeDefinitionDOM() {
}),
);
updateTransitionTypes([transitionType]);
const transitionDurationSection = makeElement("div", ["range-transition-duration-section"]);
if (transitionType.value == "") {
transitionDurationSection.classList.add("hidden");
}
// Duration always starts hidden because type always starts as cut.
const transitionDurationSection = makeElement("div", ["range-transition-duration-section", "hidden"]);
// Add/remove hidden when type changes
transitionType.addEventListener("change", (event) => {
if (transitionType.value === "") {
transitionDurationSection.classList.add("hidden");
} else {
transitionDurationSection.classList.remove("hidden");
}
});
const transitionDuration = makeElement("input", ["range-transition-duration"], {
type: "text",
value: "1",

Loading…
Cancel
Save