Open bf4 opened 10 years ago
Comment by tnbredillet
Thursday Jan 17, 2013 at 14:53 GMT
I added the following to the render function in the barwidget js and autoupdate works fine now :
if(opts.autoupdate){
var secs = parseInt(opts.autoupdate);
if(secs > 0){
var autoupdate_interval = window.setInterval(function(){
requestValuesAsync();
}, secs*1000);
$('body').bind('fm_dashboard_close', function(){
window.clearInterval(autoupdate_interval);
});
}
}
Hey !
fnordmetric is pretty amazing ;-)
I'm running into an issue though, if I'm not mistaken the autoupdates are triggered by the javascript that sends a message to the Reactor class. My issue is that my bar widget is not updating automatically even though the autoupdate parameter is set to 5.
I've looked into the js and I don't see any autoupdate function for the barwidget and I think that's the issue.
Cheers, Thomas