aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/js
diff options
context:
space:
mode:
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) {