remove range change event

This commit is contained in:
mike-000
2022-08-03 16:25:36 +01:00
parent dc9718e389
commit 4eacc92f7f
17 changed files with 42 additions and 80 deletions

View File

@@ -44,13 +44,11 @@ for (variable in variables) {
const value = variables[name];
element.value = value.toString();
document.getElementById(name + '-value').innerText = value.toFixed(2);
const listener = function (event) {
element.addEventListener('input', function (event) {
const value = parseFloat(event.target.value);
document.getElementById(name + '-value').innerText = value.toFixed(2);
const updates = {};
updates[name] = value;
layer.updateStyleVariables(updates);
};
element.addEventListener('input', listener);
element.addEventListener('change', listener);
});
}