diff options
author | Vincent Brillault | 2013-12-16 22:19:28 +0100 |
---|---|---|
committer | Pim van den Berg | 2014-01-12 14:35:02 +0100 |
commit | a4a5f38b2fc76a0e33c87e86498239571d3aabe2 (patch) | |
tree | f65c592820b059636757a50c387fd668d16ddc64 /js | |
parent | jsrrdgraph: Change alter for thow (diff) | |
download | apt-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.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) { |