summaryrefslogtreecommitdiff
path: root/web/share/js/tools.js
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-11-15 22:24:09 +0300
committerMaxim Devaev <[email protected]>2022-11-15 22:24:09 +0300
commit740a3315bd112a23944291bfec25eadd65803da0 (patch)
tree64c2a4151b3f87f28adb8095dcc6a1e91eb18a7a /web/share/js/tools.js
parent4c7ef5b28c4563ad2094b9c4dbb6648d58058104 (diff)
improved slider set range
Diffstat (limited to 'web/share/js/tools.js')
-rw-r--r--web/share/js/tools.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/web/share/js/tools.js b/web/share/js/tools.js
index 05ba7f0a..f2805fc3 100644
--- a/web/share/js/tools.js
+++ b/web/share/js/tools.js
@@ -184,8 +184,16 @@ export var tools = new function() {
el.__display_callback = display_callback;
}
},
- "setValue": function(el, value) {
+ "setRange": function(el, min, max) {
+ let value = el.value;
+ el.min = min;
+ el.max = max;
if (el.value != value) {
+ self.slider.setValue(el, el.value, true);
+ }
+ },
+ "setValue": function(el, value, force=false) {
+ if (el.value != value || force) {
if (el.__pressed) {
el.__postponed = value;
} else {