SVGHMI: more Widget properties declared ES6 style. svghmi
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Wed, 13 May 2020 22:25:22 +0200
branchsvghmi
changeset 2963 113e2f2e324d
parent 2962 02ea529fd08c
child 2966 7349063b19d8
SVGHMI: more Widget properties declared ES6 style.
svghmi/widgets_common.ysl2
--- a/svghmi/widgets_common.ysl2	Wed May 13 22:22:13 2020 +0200
+++ b/svghmi/widgets_common.ysl2	Wed May 13 22:25:22 2020 +0200
@@ -65,12 +65,13 @@
 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]);
         }