beremiz
Clone
Summary
Browse
Changes
Graph
SVGHMI: stop using eval in change_hmi_value, apparently slowly leaking memory.
svghmi
2020-05-21, Edouard Tisserant
4a9b0df0602a
SVGHMI: stop using eval in change_hmi_value, apparently slowly leaking memory.
// widget_button.ysl2
template "widget[@type='Button']", mode="widget_class"
||
class ButtonWidget extends Widget{
frequency = 5;
init() {
this.element.addEventListener(
"mousedown",
evt => {
change_hmi_value(this.indexes[0], "=1");
});
this.element.addEventListener(
"mouseup",
evt => {
change_hmi_value(this.indexes[0], "=0");
});
}
}
||