From: Uemit Seren Date: Thu, 16 Feb 2012 10:08:40 +0000 (+0100) Subject: Bug #282. Auto-test added X-Git-Tag: v1.0.0~327^2~1 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=1357d81ebb85b87b69a9de0eb01c5d8cb43774d2;p=dygraphs.git Bug #282. Auto-test added --- diff --git a/auto_tests/tests/interaction_model.js b/auto_tests/tests/interaction_model.js index 8eec47c..52338e9 100644 --- a/auto_tests/tests/interaction_model.js +++ b/auto_tests/tests/interaction_model.js @@ -331,3 +331,20 @@ InteractionModelTestCase.prototype.testIsZoomed_updateOptions_both = function() assertTrue(g.isZoomed("x")); assertTrue(g.isZoomed("y")); }; + + +InteractionModelTestCase.prototype.testCorrectYAxisValueRangeAfterUnzoom = function() { + var g = new Dygraph(document.getElementById("graph"), data2, {valueRange:[1,50],animatedZooms:true}); + + currentYAxisRange = g.yAxisRange(0); + assertEquals(1,currentYAxisRange[0]); + assertEquals(50,currentYAxisRange[1]); + + g.updateOptions({dateWindow: [-1, 1], valueWindow: [5, 10]}); + + DygraphOps.dispatchDoubleClick(g, null); + + newYAxisRange = g.yAxisRange(0); + assertEquals(1,newYAxisRange[0]); + assertEquals(50,newYAxisRange[1]); +};