From: Dan Vanderkam Date: Fri, 6 Jul 2012 01:24:55 +0000 (-0400) Subject: blah X-Git-Tag: v1.0.0~256 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=f417e3d384d1a03a38ce57a759c37b2de8eda937;p=dygraphs.git blah --- 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?