summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2021-10-18 10:03:28 +0300
committerMaxim Devaev <[email protected]>2021-10-18 10:03:28 +0300
commit2e886ff92b9b41211402b11f896b86d99273567f (patch)
tree5315c05c7858bf568734803d67f18ccb94d1d2fb
parent0482fc250337ede68325ba92ed208b52f576e282 (diff)
refactoring
-rw-r--r--web/share/js/tools.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/share/js/tools.js b/web/share/js/tools.js
index 54d3a175..eb3ab957 100644
--- a/web/share/js/tools.js
+++ b/web/share/js/tools.js
@@ -139,8 +139,6 @@ export var tools = new function() {
}
};
- el.oninput = el.onchange = () => display_callback(self.slider.getValue(el));
-
el.onmousedown = el.ontouchstart = function() {
clear_timer();
};
@@ -154,7 +152,9 @@ export var tools = new function() {
}, delay);
};
- display_callback(self.slider.getValue(el));
+ let value = self.slider.getValue(el);
+ el.oninput = el.onchange = () => display_callback(value);
+ display_callback(value);
},
"setParams": function(el, min, max, step, value) {
el.min = min;