svghmi/svghmi.js
branchsvghmi
changeset 2871 ed9b16b33628
parent 2870 634b43d69897
child 2889 4eeed820fd3a
equal deleted inserted replaced
2870:634b43d69897 2871:ed9b16b33628
    10         let d = widget.dispatch;
    10         let d = widget.dispatch;
    11         console.log(index, idx, idxidx, value);
    11         console.log(index, idx, idxidx, value);
    12         if(typeof(d) == "function" && idxidx == 0){
    12         if(typeof(d) == "function" && idxidx == 0){
    13             d.call(widget, value, oldval);
    13             d.call(widget, value, oldval);
    14         }
    14         }
    15         /* TODO deal with multiple paths
    15         else if(typeof(d) == "object" && d.length >= idxidx){
    16            and dispatch according to index+page_offset */
       
    17         /*else if(typeof(d) == "object" && d.length >= idxidx){
       
    18             d[idxidx].call(widget, value, oldval);
    16             d[idxidx].call(widget, value, oldval);
    19         }*/
    17         }
    20         /* else dispatch_0, ..., dispatch_n ? */
    18         /* else dispatch_0, ..., dispatch_n ? */
    21         /*else {
    19         /*else {
    22             throw new Error("Dunno how to dispatch to widget at index = " + index);
    20             throw new Error("Dunno how to dispatch to widget at index = " + index);
    23         }*/
    21         }*/
    24     } catch(err) {
    22     } catch(err) {