equal
deleted
inserted
replaced
7 let new_val = this.change_hmi_value(0, opstr); |
7 let new_val = this.change_hmi_value(0, opstr); |
8 } |
8 } |
9 edit_callback(new_val) { |
9 edit_callback(new_val) { |
10 this.apply_hmi_value(0, new_val); |
10 this.apply_hmi_value(0, new_val); |
11 } |
11 } |
|
12 |
|
13 overshot(new_val, max) { |
|
14 this.last_display = "max: "+max; |
|
15 this.request_animate(); |
|
16 } |
|
17 |
|
18 undershot(new_val, min) { |
|
19 this.last_display = "min: "+min; |
|
20 this.request_animate(); |
|
21 } |
|
22 |
|
23 |
12 } |
24 } |
13 || |
25 || |
14 } |
26 } |
15 |
27 |
16 template "widget[@type='Input']", mode="widget_defs" { |
28 template "widget[@type='Input']", mode="widget_defs" { |
33 | dispatch: function(value) { |
45 | dispatch: function(value) { |
34 |
46 |
35 if "$have_edit" |
47 if "$have_edit" |
36 | this.last_val = value; |
48 | this.last_val = value; |
37 |
49 |
38 if "$have_value" |
50 if "$have_value" { |
39 | this.value_elt.textContent = String(value); |
51 | this.last_display = value; |
|
52 | this.request_animate(); |
|
53 } |
|
54 | }, |
40 |
55 |
|
56 if "$have_value" { |
|
57 | animate: function(){ |
|
58 | this.value_elt.textContent = String(this.last_display); |
41 | }, |
59 | }, |
|
60 } |
42 |
61 |
43 | init: function() { |
62 | init: function() { |
44 |
63 |
45 if "$have_edit" { |
64 if "$have_edit" { |
46 | this.edit_elt.onclick = () => edit_value( |
65 | this.edit_elt.onclick = () => edit_value( |