SVGHMI: Re-enable dispatch to arrays of functions in case of multiple suscription per widget. Still unused, but disabled for reasons not any more true. svghmi
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Mon, 16 Mar 2020 17:09:23 +0100
branchsvghmi
changeset 2871 ed9b16b33628
parent 2870 634b43d69897
child 2872 83adf8859c55
SVGHMI: Re-enable dispatch to arrays of functions in case of multiple suscription per widget. Still unused, but disabled for reasons not any more true.
svghmi/svghmi.js
--- a/svghmi/svghmi.js	Fri Mar 13 21:42:40 2020 +0100
+++ b/svghmi/svghmi.js	Mon Mar 16 17:09:23 2020 +0100
@@ -12,11 +12,9 @@
         if(typeof(d) == "function" && idxidx == 0){
             d.call(widget, value, oldval);
         }
-        /* TODO deal with multiple paths
-           and dispatch according to index+page_offset */
-        /*else if(typeof(d) == "object" && d.length >= idxidx){
+        else if(typeof(d) == "object" && d.length >= idxidx){
             d[idxidx].call(widget, value, oldval);
-        }*/
+        }
         /* else dispatch_0, ..., dispatch_n ? */
         /*else {
             throw new Error("Dunno how to dispatch to widget at index = " + index);