From: Dan Vanderkam Date: Fri, 22 Oct 2010 01:19:23 +0000 (-0400) Subject: two bug fixes X-Git-Tag: v1.0.0~622^2~6 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=d63e67995e52dde3b735aaa0b426d4dfc2337126;p=dygraphs.git two bug fixes --- diff --git a/dygraph.js b/dygraph.js index a73a8e4..ae27c7c 100644 --- a/dygraph.js +++ b/dygraph.js @@ -318,7 +318,7 @@ Dygraph.prototype.xAxisRange = function() { * Returns a two-element array: [bottom, top]. */ Dygraph.prototype.yAxisRange = function(idx) { - if (typeof(idx) == "undefined") idx == 0; + if (typeof(idx) == "undefined") idx = 0; if (idx < 0 || idx >= this.axes_.length) return null; return [ this.axes_[idx].computedValueRange[0], this.axes_[idx].computedValueRange[1] ]; @@ -897,8 +897,8 @@ Dygraph.prototype.createDragInterface_ = function() { draggingDate = null; dateRange = null; for (var i = 0; i < self.axes_.length; i++) { - delete this.axes_[i].draggingValue; - delete this.axes_[i].dragValueRange; + delete self.axes_[i].draggingValue; + delete self.axes_[i].dragValueRange; } } });