equal
deleted
inserted
replaced
43 |
43 |
44 if "$have_edit" |
44 if "$have_edit" |
45 | this.last_val = value; |
45 | this.last_val = value; |
46 |
46 |
47 if "$have_value" { |
47 if "$have_value" { |
|
48 choose{ |
|
49 when "count(arg) = 1" { |
|
50 | this.last_display = vsprintf("«arg[1]/@value»", value); |
|
51 } |
|
52 otherwise { |
48 | this.last_display = value; |
53 | this.last_display = value; |
|
54 } |
|
55 } |
49 | this.request_animate(); |
56 | this.request_animate(); |
50 } |
57 } |
51 | }, |
58 | }, |
52 |
59 |
53 if "$have_value" { |
60 if "$have_value" { |
58 |
65 |
59 | init: function() { |
66 | init: function() { |
60 |
67 |
61 if "$have_edit" { |
68 if "$have_edit" { |
62 | 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_val); |
|
70 if "$have_value" { |
|
71 | this.value_elt.style.pointerEvents = "none"; |
|
72 } |
63 } |
73 } |
64 |
74 |
65 foreach "$hmi_element/*[regexp:test(@inkscape:label,'^[=+\-].+')]" { |
75 foreach "$hmi_element/*[regexp:test(@inkscape:label,'^[=+\-].+')]" { |
66 | id("«@id»").onclick = () => this.on_op_click("«func:escape_quotes(@inkscape:label)»"); |
76 | id("«@id»").onclick = () => this.on_op_click("«func:escape_quotes(@inkscape:label)»"); |
67 } |
77 } |