From f417e3d384d1a03a38ce57a759c37b2de8eda937 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Thu, 5 Jul 2012 21:24:55 -0400 Subject: [PATCH] blah --- dygraph.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dygraph.js b/dygraph.js index 8979c6f..99fdf3b 100644 --- a/dygraph.js +++ b/dygraph.js @@ -2102,7 +2102,10 @@ Dygraph.prototype.predraw_ = function() { this.computeYAxes_(); // Create a new plotter. - if (this.plotter_) this.plotter_.clear(); + if (this.plotter_) { + this.cascadeEvents_('clear'); + this.plotter_.clear(); + } this.plotter_ = new DygraphCanvasRenderer(this, this.hidden_, this.hidden_ctx_, @@ -2330,7 +2333,9 @@ Dygraph.prototype.drawGraph_ = function() { * @private */ Dygraph.prototype.renderGraph_ = function(is_initial_draw) { + this.cascadeEvents_('clear'); this.plotter_.clear(); + this.plotter_.render(); // TODO(danvk): is this a performance bottleneck when panning? -- 2.7.4