# HG changeset patch # User Edouard Tisserant # Date 1589401522 -7200 # Node ID 113e2f2e324d31b7b5ff3a0add1dff04dd6a8e4f # Parent 02ea529fd08c9f7b32e6d3eeaa80b099f07d9ef5 SVGHMI: more Widget properties declared ES6 style. diff -r 02ea529fd08c -r 113e2f2e324d 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]); }