equal
deleted
inserted
replaced
39 if "$have_value" |
39 if "$have_value" |
40 | frequency: 5, |
40 | frequency: 5, |
41 |
41 |
42 | dispatch: function(value) { |
42 | dispatch: function(value) { |
43 |
43 |
44 if "$have_edit" |
|
45 | this.last_val = value; |
|
46 |
44 |
47 if "$have_value" { |
45 if "$have_value or $have_edit" { |
48 choose{ |
46 choose{ |
49 when "count(arg) = 1" { |
47 when "count(arg) = 1" { |
50 | this.last_display = vsprintf("«arg[1]/@value»", value); |
48 | this.last_display = vsprintf("«arg[1]/@value»", [value]); |
51 } |
49 } |
52 otherwise { |
50 otherwise { |
53 | this.last_display = value; |
51 | this.last_display = value; |
54 } |
52 } |
55 } |
53 } |
|
54 } |
|
55 if "$have_value" { |
56 | this.request_animate(); |
56 | this.request_animate(); |
57 } |
57 } |
58 | }, |
58 | }, |
59 |
59 |
60 if "$have_value" { |
60 if "$have_value" { |
64 } |
64 } |
65 |
65 |
66 | init: function() { |
66 | init: function() { |
67 |
67 |
68 if "$have_edit" { |
68 if "$have_edit" { |
69 | this.edit_elt.onclick = () => edit_value("«path/@value»", "«path/@type»", this, this.last_val); |
69 | this.edit_elt.onclick = () => edit_value("«path/@value»", "«path/@type»", this, this.last_display); |
70 if "$have_value" { |
70 if "$have_value" { |
71 | this.value_elt.style.pointerEvents = "none"; |
71 | this.value_elt.style.pointerEvents = "none"; |
72 } |
72 } |
73 } |
73 } |
74 |
74 |