equal
deleted
inserted
replaced
90 widget.apply_cache(); |
90 widget.apply_cache(); |
91 } |
91 } |
92 |
92 |
93 if(jumps_need_update) update_jumps(); |
93 if(jumps_need_update) update_jumps(); |
94 |
94 |
95 apply_updates(); |
|
96 |
95 |
97 pending_widget_animates.forEach(widget => widget._animate()); |
96 pending_widget_animates.forEach(widget => widget._animate()); |
98 pending_widget_animates = []; |
97 pending_widget_animates = []; |
99 rearm = false; |
98 rearm = false; |
100 } while(0); |
99 } while(0); |
137 i += bytesize; |
136 i += bytesize; |
138 } else { |
137 } else { |
139 throw new Error("Unknown index "+index); |
138 throw new Error("Unknown index "+index); |
140 } |
139 } |
141 }; |
140 }; |
|
141 |
|
142 apply_updates(); |
142 // register for rendering on next frame, since there are updates |
143 // register for rendering on next frame, since there are updates |
143 requestHMIAnimation(); |
|
144 } catch(err) { |
144 } catch(err) { |
145 // 1003 is for "Unsupported Data" |
145 // 1003 is for "Unsupported Data" |
146 // ws.close(1003, err.message); |
146 // ws.close(1003, err.message); |
147 |
147 |
148 // TODO : remove debug alert ? |
148 // TODO : remove debug alert ? |
346 send_blob(delta); |
346 send_blob(delta); |
347 }; |
347 }; |
348 |
348 |
349 function send_hmi_value(index, value) { |
349 function send_hmi_value(index, value) { |
350 if(index > last_remote_index){ |
350 if(index > last_remote_index){ |
351 updates.set(index, value); |
351 dispatch_value(index, value); |
352 |
352 |
353 if(persistent_indexes.has(index)){ |
353 if(persistent_indexes.has(index)){ |
354 let varname = persistent_indexes.get(index); |
354 let varname = persistent_indexes.get(index); |
355 document.cookie = varname+"="+value+"; max-age=3153600000"; |
355 document.cookie = varname+"="+value+"; max-age=3153600000"; |
356 } |
356 } |
357 |
357 |
358 requestHMIAnimation(); |
|
359 return; |
358 return; |
360 } |
359 } |
361 |
360 |
362 let iectype = hmitree_types[index]; |
361 let iectype = hmitree_types[index]; |
363 let tobinary = typedarray_types[iectype]; |
362 let tobinary = typedarray_types[iectype]; |