From: Dan Vanderkam Date: Sat, 28 Mar 2015 18:29:47 +0000 (-0400) Subject: Make constructor a pure forward to __init__. X-Git-Tag: v2.0.0~66^2~6 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=79ea4032d8200129384974c9f14ff35cd3443b3f;p=dygraphs.git 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. --- 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 = {}; }