From: Uemit Seren Date: Thu, 16 Feb 2012 10:07:26 +0000 (+0100) Subject: Bugfix #282. Use valueRange (if specified) instead of extremes during unzooming.... X-Git-Tag: v1.0.0~327^2~2 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=1f6a6254deed20c2c25108bf6d98a298898ba34a;p=dygraphs.git Bugfix #282. Use valueRange (if specified) instead of extremes during unzooming. Fixed the check whether the y-axis is dirty --- diff --git a/dygraph.js b/dygraph.js index 758d26d..18dea9e 100644 --- a/dygraph.js +++ b/dygraph.js @@ -1332,7 +1332,7 @@ Dygraph.prototype.doUnzoom_ = function() { } for (var i = 0; i < this.axes_.length; i++) { - if (this.axes_[i].valueWindow !== null) { + if (typeof(this.axes_[i].valueWindow) !== 'undefined' && this.axes_[i].valueWindow !== null) { dirty = true; dirtyY = true; } @@ -1384,7 +1384,8 @@ Dygraph.prototype.doUnzoom_ = function() { newValueRanges = []; for (i = 0; i < this.axes_.length; i++) { - newValueRanges.push(this.axes_[i].extremeRange); + var axis = this.axes_[i]; + newValueRanges.push(axis.valueRange != null ? axis.valueRange : axis.extremeRange); } }