From: Robert Konigsberg Date: Sun, 30 Dec 2012 01:47:11 +0000 (-0500) Subject: Simplify valueRange work in computeYAxes. Add comment indicating its weirdness. X-Git-Tag: v1.0.0~138^2~1 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=7740dd009f69ba26aeea7ffd239dbba49a70ae1d;p=dygraphs.git Simplify valueRange work in computeYAxes. Add comment indicating its weirdness. --- diff --git a/dygraph.js b/dygraph.js index 2135b3c..1ac7d43 100644 --- a/dygraph.js +++ b/dygraph.js @@ -2452,12 +2452,13 @@ Dygraph.prototype.computeYAxes_ = function() { this.axes_[axis] = opts; } - // TODO(konigsberg): REMOVE THIS SILLINESS this should just come from DygraphOptions. - // Copy global axis options over to the first axis. - var k = 'valueRange'; - v = this.attr_(k); - if (v) this.axes_[0][k] = v; - // TODO(konigsberg): end of REMOVE THIS SILLINESS + + // Copy global valueRange option over to the first axis. + // NOTE(konigsberg): Are these two statements necessary? + // I tried removing it. The automated tests pass, and manually + // messing with tests/zoom.html showed no trouble. + v = this.attr_('valueRange'); + if (v) this.axes_[0].valueRange = v; if (valueWindows !== undefined) { // Restore valueWindow settings.