diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/CGP.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -62,7 +62,7 @@ var mouse_scroll = function (e) { | |||
62 | return false; | 62 | return false; |
63 | }; | 63 | }; |
64 | 64 | ||
65 | function draw(id) { | 65 | function 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 | |||
110 | function 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) { |