X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=src%2Fdygraph.js;h=4f3ce77a93cbf1502f0b68fae7fd760042164d60;hb=98759508ba47001d531374bf1934232246b4eaf1;hp=df6baf9bdea01a3693c6ca3e5f7ba3e5bd94de7d;hpb=23b6c2e2d33b752d735f3b5d059d34440ff7f8c1;p=dygraphs.git diff --git a/src/dygraph.js b/src/dygraph.js index df6baf9..4f3ce77 100644 --- a/src/dygraph.js +++ b/src/dygraph.js @@ -2671,7 +2671,7 @@ Dygraph.prototype.renderGraph_ = function(is_initial_draw) { this.canvas_.getContext('2d').clearRect(0, 0, this.width_, this.height_); if (this.getFunctionOption("drawCallback") !== null) { - this.getFunctionOption("drawCallback")(this, is_initial_draw); + this.getFunctionOption("drawCallback").call(this, this, is_initial_draw); } if (is_initial_draw) { this.readyFired_ = true; @@ -3747,6 +3747,10 @@ Dygraph.addAnnotationRule = function() { console.warn("Unable to add default annotation CSS rule; display may be off."); }; +if (typeof exports === "object" && typeof module !== "undefined") { + module.exports = Dygraph; +} + return Dygraph; })();