From 775da40f8c247a97a01c3affd75511b4cbdb95b7 Mon Sep 17 00:00:00 2001 From: Vincent Brillault Date: Mon, 16 Dec 2013 22:28:33 +0100 Subject: Add a configuration option for sync/async choice for the canvas graphs --- js/CGP-async.js | 21 +++++++++++++++++++++ js/CGP-sync.js | 21 +++++++++++++++++++++ js/CGP.js | 22 ---------------------- 3 files changed, 42 insertions(+), 22 deletions(-) create mode 100644 js/CGP-async.js create mode 100644 js/CGP-sync.js (limited to 'js') diff --git a/js/CGP-async.js b/js/CGP-async.js new file mode 100644 index 0000000..4976509 --- /dev/null +++ b/js/CGP-async.js @@ -0,0 +1,21 @@ +function draw(id) { + var rrdgraph = prepare_draw(id); + + try { + rrdgraph.graph_paint_async(); + } catch (e) { + alert(e+"\n"+e.stack); + } +} + +function drawAll() +{ + var list=[]; + var a=document.getElementsByClassName('rrd'); + for (var i=0,l=a.length;i