From: Robert Konigsberg Date: Wed, 9 Jan 2013 01:17:26 +0000 (-0500) Subject: Move doUnzoom_ to the public API. X-Git-Tag: v1.0.0~130^2~1 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=e70e19abc363a5c8042452a082acc514f970b40c;p=dygraphs.git Move doUnzoom_ to the public API. --- diff --git a/dygraph-interaction-model.js b/dygraph-interaction-model.js index b5e9ee3..94dfe3c 100644 --- a/dygraph-interaction-model.js +++ b/dygraph-interaction-model.js @@ -574,9 +574,7 @@ Dygraph.Interaction.defaultModel = { if (event.altKey || event.shiftKey) { return; } - // TODO(konigsberg): replace g.doUnzoom()_ with something that is - // friendlier to public use. - g.doUnzoom_(); + g.restoreZoom(); } }; diff --git a/dygraph-range-selector.js b/dygraph-range-selector.js index b777470..0db095f 100644 --- a/dygraph-range-selector.js +++ b/dygraph-range-selector.js @@ -278,7 +278,7 @@ DygraphRangeSelector.prototype.initInteraction_ = function() { var zoomHandleStatus = self.getZoomHandleStatus_(); self.isChangingRange_ = true; if (!zoomHandleStatus.isZoomed) { - self.dygraph_.doUnzoom_(); + self.dygraph_.restoreZoom(); } else { var xDataWindow = toXDataWindow(zoomHandleStatus); self.dygraph_.doZoomXDates_(xDataWindow[0], xDataWindow[1]); diff --git a/dygraph.js b/dygraph.js index 4c8c65d..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;