diff -r ba8ff21fd82b -r c173452bf894 svghmi/gen_index_xhtml.xslt
--- a/svghmi/gen_index_xhtml.xslt Fri Mar 12 15:12:38 2021 +0100
+++ b/svghmi/gen_index_xhtml.xslt Mon Mar 15 11:25:24 2021 +0100
@@ -4422,11 +4422,37 @@
+ is_inhibited = false;
+
+ alert(msg){
+
+ this.is_inhibited = true;
+
+ this.display = msg;
+
+ setTimeout(() => this.stopalert(), 1000);
+
+ this.request_animate();
+
+ }
+
+
+
+ stopalert(){
+
+ this.is_inhibited = false;
+
+ this.display = this.last_value;
+
+ this.request_animate();
+
+ }
+
+
+
overshot(new_val, max) {
- this.last_display = "max: "+max;
-
- this.request_animate();
+ this.alert("max");
}
@@ -4434,9 +4460,7 @@
undershot(new_val, min) {
- this.last_display = "min: "+min;
-
- this.request_animate();
+ this.alert("min");
}
@@ -4480,19 +4504,25 @@
- this.last_display = vsprintf("
+ this.last_value = vsprintf("
", [value]);
- this.last_display = value;
+ this.last_value = value;
-
-
- this.request_animate();
+ if(!this.is_inhibited){
+
+ this.display = this.last_value;
+
+
+ this.request_animate();
+
+
+ }
},
@@ -4500,7 +4530,7 @@
animate: function(){
- this.value_elt.textContent = String(this.last_display);
+ this.value_elt.textContent = String(this.display);
},
@@ -4512,7 +4542,7 @@
", "
- ", this, this.last_display);
+ ", this, this.last_value);
this.value_elt.style.pointerEvents = "none";