--- a/svghmi/widgets_common.ysl2 Wed May 13 14:48:52 2020 +0200
+++ b/svghmi/widgets_common.ysl2 Thu May 14 09:24:09 2020 +0200
@@ -65,13 +65,16 @@
emit "preamble:widget-base-class" {
||
class Widget {
+ offset = 0;
+ frequency = 10; /* FIXME arbitrary default max freq. Obtain from config ? */
constructor(elt_id,args,indexes,members){
+ this.element_id = elt_id;
this.element = id(elt_id);
this.args = args;
this.indexes = indexes;
- this.offset = 0;
Object.keys(members).forEach(prop => this[prop]=members[prop]);
}
+
unsub(){
/* remove subsribers */
for(let index of this.indexes){