From: Dan Vanderkam Date: Fri, 23 Apr 2010 19:20:53 +0000 (-0700) Subject: add resize_lock, which fixes a bug in chrome X-Git-Tag: v1.0.0~691 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=e8c7ef862e1b1f6f5269ec931bdce85d9d7052a7;p=dygraphs.git add resize_lock, which fixes a bug in chrome --- diff --git a/dygraph.js b/dygraph.js index a9b14ab..5f344ba 100644 --- a/dygraph.js +++ b/dygraph.js @@ -2213,6 +2213,11 @@ Dygraph.prototype.updateOptions = function(attrs) { * @param {Number} height Height (in pixels) */ Dygraph.prototype.resize = function(width, height) { + if (this.resize_lock) { + return; + } + this.resize_lock = true; + if ((width === null) != (height === null)) { this.warn("Dygraph.resize() should be called with zero parameters or " + "two non-NULL parameters. Pretending it was zero."); @@ -2235,6 +2240,8 @@ Dygraph.prototype.resize = function(width, height) { this.createInterface_(); this.drawGraph_(this.rawData_); + + this.resize_lock = false; }; /**