From e8c7ef862e1b1f6f5269ec931bdce85d9d7052a7 Mon Sep 17 00:00:00 2001
From: Dan Vanderkam <danvk@google.com>
Date: Fri, 23 Apr 2010 12:20:53 -0700
Subject: [PATCH] add resize_lock, which fixes a bug in chrome

---
 dygraph.js | 7 +++++++
 1 file changed, 7 insertions(+)

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;
 };
 
 /**
-- 
2.7.4