aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/js
diff options
context:
space:
mode:
authorVincent Brillault2013-12-16 22:19:28 +0100
committerPim van den Berg2014-01-12 14:35:02 +0100
commita4a5f38b2fc76a0e33c87e86498239571d3aabe2 (patch)
treef65c592820b059636757a50c387fd668d16ddc64 /js
parentjsrrdgraph: Change alter for thow (diff)
downloadapt-panopticon_cgp-a4a5f38b2fc76a0e33c87e86498239571d3aabe2.zip
apt-panopticon_cgp-a4a5f38b2fc76a0e33c87e86498239571d3aabe2.tar.gz
apt-panopticon_cgp-a4a5f38b2fc76a0e33c87e86498239571d3aabe2.tar.bz2
apt-panopticon_cgp-a4a5f38b2fc76a0e33c87e86498239571d3aabe2.tar.xz
jsrrdgraph: CGP.js: split draw(id) into prepare_draw(id) and draw(id)
Diffstat (limited to 'js')
-rw-r--r--js/CGP.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/js/CGP.js b/js/CGP.js
index 3c9ea90..add1a20 100644
--- a/js/CGP.js
+++ b/js/CGP.js
@@ -62,7 +62,7 @@ var mouse_scroll = function (e) {
62 return false; 62 return false;
63}; 63};
64 64
65function draw(id) { 65function prepare_draw(id) {
66 RrdGraph.prototype.mousex = 0; 66 RrdGraph.prototype.mousex = 0;
67 RrdGraph.prototype.mousedown = false; 67 RrdGraph.prototype.mousedown = false;
68 68
@@ -104,6 +104,12 @@ function draw(id) {
104 if (i === gfx.canvas.stlen) gfx.canvas.stidx = gfx.canvas.stlen-1; 104 if (i === gfx.canvas.stlen) gfx.canvas.stidx = gfx.canvas.stlen-1;
105 else gfx.canvas.stidx = i; 105 else gfx.canvas.stidx = i;
106 106
107 return rrdgraph;
108}
109
110function draw(id) {
111 var rrdgraph = prepare_draw(id);
112
107 try { 113 try {
108 rrdgraph.graph_paint(); 114 rrdgraph.graph_paint();
109 } catch (e) { 115 } catch (e) {