svghmi/svghmi.js
branchsvghmi
changeset 3035 d1fc8c55c1d3
parent 3024 0a9f6f29b7dd
child 3068 81758c94f3df
equal deleted inserted replaced
3034:793ce2117258 3035:d1fc8c55c1d3
   238     send_blob(delta);
   238     send_blob(delta);
   239 };
   239 };
   240 
   240 
   241 function send_hmi_value(index, value) {
   241 function send_hmi_value(index, value) {
   242     if(index > last_remote_index){
   242     if(index > last_remote_index){
   243         console.log("updated local variable ",index,value);
       
   244         updates[index] = value;
   243         updates[index] = value;
   245         requestHMIAnimation();
   244         requestHMIAnimation();
   246         return;
   245         return;
   247     }
   246     }
   248 
   247 
   414 var xmlns = "http://www.w3.org/2000/svg";
   413 var xmlns = "http://www.w3.org/2000/svg";
   415 var edit_callback;
   414 var edit_callback;
   416 function edit_value(path, valuetype, callback, initial, size) {
   415 function edit_value(path, valuetype, callback, initial, size) {
   417 
   416 
   418     let [keypadid, xcoord, ycoord] = keypads[valuetype];
   417     let [keypadid, xcoord, ycoord] = keypads[valuetype];
   419     console.log('XXX TODO : Edit value', path, valuetype, callback, initial, keypadid);
       
   420     edit_callback = callback;
   418     edit_callback = callback;
   421     let widget = hmi_widgets[keypadid];
   419     let widget = hmi_widgets[keypadid];
   422     widget.start_edit(path, valuetype, callback, initial, size);
   420     widget.start_edit(path, valuetype, callback, initial, size);
   423 };
   421 };
   424 
   422 
   459     if(eltsub.inactive_style === undefined)
   457     if(eltsub.inactive_style === undefined)
   460         eltsub.inactive_style = eltsub.inactive.getAttribute("style");
   458         eltsub.inactive_style = eltsub.inactive.getAttribute("style");
   461     eltsub.inactive.setAttribute("style", "display:none");
   459     eltsub.inactive.setAttribute("style", "display:none");
   462     if(eltsub.active_style !== undefined)
   460     if(eltsub.active_style !== undefined)
   463             eltsub.active.setAttribute("style", eltsub.active_style);
   461             eltsub.active.setAttribute("style", eltsub.active_style);
   464     console.log("active", eltsub);
       
   465 };
   462 };
   466 function widget_inactive_activable(eltsub) {
   463 function widget_inactive_activable(eltsub) {
   467     if(eltsub.active_style === undefined)
   464     if(eltsub.active_style === undefined)
   468         eltsub.active_style = eltsub.active.getAttribute("style");
   465         eltsub.active_style = eltsub.active.getAttribute("style");
   469     eltsub.active.setAttribute("style", "display:none");
   466     eltsub.active.setAttribute("style", "display:none");
   470     if(eltsub.inactive_style !== undefined)
   467     if(eltsub.inactive_style !== undefined)
   471             eltsub.inactive.setAttribute("style", eltsub.inactive_style);
   468             eltsub.inactive.setAttribute("style", eltsub.inactive_style);
   472     console.log("inactive", eltsub);
   469 };
   473 };