From: Paul Felix Date: Tue, 8 Jan 2013 18:24:08 +0000 (-0500) Subject: Need to call createDragInterface_() after plugins are activated in order to allow... X-Git-Tag: v1.0.0~126 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=487f552390a89348e20235322ffc6d71176cca04;p=dygraphs.git Need to call createDragInterface_() after plugins are activated in order to allow a plugin to change the default interactionModel. --- diff --git a/dygraph.js b/dygraph.js index 092f511..f0ced90 100644 --- a/dygraph.js +++ b/dygraph.js @@ -485,6 +485,8 @@ Dygraph.prototype.__init__ = function(div, file, attrs) { } } + this.createDragInterface_(); + this.start_(); }; @@ -963,8 +965,6 @@ Dygraph.prototype.createInterface_ = function() { }; this.addEvent(this.mouseEventElement_, 'mouseout', this.mouseOutHandler); - this.createDragInterface_(); - this.resizeHandler = function(e) { dygraph.resize(); }; @@ -3395,6 +3395,7 @@ Dygraph.prototype.resize = function(width, height) { // createInterface_ reset the layout, so we need to do this. this.layout_.setAnnotations(this.annotations_); } + this.createDragInterface_(); this.predraw_(); }