svghmi/widgets_common.ysl2
changeset 3417 9b9775d230f5
parent 3412 04c4835ca376
child 3452 a0bd2c4cb8f7
equal deleted inserted replaced
3414:0ff608310312 3417:9b9775d230f5
   172         pending_animate = false;
   172         pending_animate = false;
   173 
   173 
   174         constructor(elt_id, freq, args, indexes, minmaxes, members){
   174         constructor(elt_id, freq, args, indexes, minmaxes, members){
   175             this.element_id = elt_id;
   175             this.element_id = elt_id;
   176             this.element = id(elt_id);
   176             this.element = id(elt_id);
   177             if(freq !== undefined) this.frequency = freq;
       
   178             this.args = args;
   177             this.args = args;
   179             this.indexes = indexes;
   178             this.indexes = indexes;
   180             this.minmaxes = minmaxes;
   179             this.minmaxes = minmaxes;
   181             Object.keys(members).forEach(prop => this[prop]=members[prop]);
   180             Object.keys(members).forEach(prop => this[prop]=members[prop]);
   182             this.lastapply = indexes.map(() => undefined);
   181             this.lastapply = indexes.map(() => undefined);
   183             this.inhibit = indexes.map(() => undefined);
   182             this.inhibit = indexes.map(() => undefined);
   184             this.pending = indexes.map(() => undefined);
   183             this.pending = indexes.map(() => undefined);
   185             this.bound_unhinibit = this.unhinibit.bind(this);
   184             this.bound_unhinibit = this.unhinibit.bind(this);
       
   185             this.forced_frequency = freq;
   186         }
   186         }
   187 
   187 
   188         unsub(){
   188         unsub(){
   189             /* remove subsribers */
   189             /* remove subsribers */
   190             if(!this.unsubscribable)
   190             if(!this.unsubscribable)