X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph.js;h=a97dafe61de14aef821558c4cc9368a1de0afaa1;hb=e70e19abc363a5c8042452a082acc514f970b40c;hp=d7c558beb8a2585fcabd85f2bdd40593b4ca7377;hpb=48dc3815c2cd342aab3d47978b5351e2ce5bcf43;p=dygraphs.git diff --git a/dygraph.js b/dygraph.js index d7c558b..a97dafe 100644 --- a/dygraph.js +++ b/dygraph.js @@ -1462,10 +1462,8 @@ Dygraph.prototype.doZoomY_ = function(lowY, highY) { /** * Reset the zoom to the original view coordinates. This is the same as * double-clicking on the graph. - * - * @private */ -Dygraph.prototype.doUnzoom_ = function() { +Dygraph.prototype.restoreZoom = function() { var dirty = false, dirtyX = false, dirtyY = false; if (this.dateWindow_ !== null) { dirty = true; @@ -2455,23 +2453,13 @@ Dygraph.prototype.computeYAxes_ = function() { this.axes_[axis] = opts; } - // TODO(konigsberg): REMOVE THIS SILLINESS this should just come from DygraphOptions. - // TODO(konigsberg): Add tests for all of these. - // all options which could be applied per-axis: - var axisOptions = [ - 'valueRange', - 'pixelsPerYLabel', - 'axisLabelFontSize', - ]; - - // Copy global axis options over to the first axis. - for (i = 0; i < axisOptions.length; i++) { - var k = axisOptions[i]; - 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.