Closed Feandil closed 10 years ago
Thanks for the patch.
Thanks :)
I just realised that '"async_paint" is probably not the best choice for a function name. The async part of this function is the fetch. The painting part will not be async, it's still using graph_paint_draw() (sorry)
maybe a single function like this?
RrdGraph.prototype.graph_paint = function (async_fetch)
{
this.graph_paint_init()
if (async_fetch === undefined || !async_fetch) {
if (this.data_fetch() === -1)
return -1;
return this.graph_paint_draw()
} else {
this.data_fetch_async()
}
};
Adding some async methods required to make CGP more responsive (see https://github.com/pommi/CGP/pull/37)
No modification to the existing API, I'm just adding stuff ,) I tried to re-use as much existing code as possible, as you can see in the "splitting" commits.
I'm not good at javascript, thus do not hesitate to make comments