From 79ea4032d8200129384974c9f14ff35cd3443b3f Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Sat, 28 Mar 2015 14:29:47 -0400 Subject: [PATCH] Make constructor a pure forward to __init__. I don't understand the comment I removed here at all, but it does seem to indicate that this change is safe. --- src/dygraph.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/dygraph.js b/src/dygraph.js index fc13b33..7121458 100644 --- a/src/dygraph.js +++ b/src/dygraph.js @@ -65,12 +65,6 @@ var Dygraph = (function() { * options, see http://dygraphs.com/options.html. */ var Dygraph = function(div, data, opts) { - // These have to go above the "Hack for IE" in __init__ since .ready() can be - // called as soon as the constructor returns. Once support for OldIE is - // dropped, this can go down with the rest of the initializers. - this.is_initial_draw_ = true; - this.readyFns_ = []; - this.__init__(div, data, opts); }; @@ -396,6 +390,9 @@ Dygraph.addedAnnotationCSS = false; * @private */ Dygraph.prototype.__init__ = function(div, file, attrs) { + this.is_initial_draw_ = true; + this.readyFns_ = []; + // Support two-argument constructor if (attrs === null || attrs === undefined) { attrs = {}; } -- 2.7.4