From: Robert Konigsberg Date: Wed, 22 Dec 2010 22:29:47 +0000 (-0800) Subject: Panning is always allowed, even if you're not zoomed. X-Git-Tag: v1.0.0~584^2~16 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=2bedbd16070e6c9f48ef0b6ff7ef611b5f294613;p=dygraphs.git Panning is always allowed, even if you're not zoomed. --- diff --git a/dygraph.js b/dygraph.js index 6be205a..1621b38 100644 --- a/dygraph.js +++ b/dygraph.js @@ -798,19 +798,6 @@ Dygraph.prototype.dragGetY_ = function(e, context) { // panning behavior. // Dygraph.startPan = function(event, g, context) { - // have to be zoomed in to pan. - // TODO(konigsberg): Let's loosen this zoom-to-pan restriction, also - // perhaps create panning boundaries? A more flexible pan would make it, - // ahem, 'pan-useful'. - var zoomedY = false; - for (var i = 0; i < g.axes_.length; i++) { - if (g.axes_[i].valueWindow || g.axes_[i].valueRange) { - zoomedY = true; - break; - } - } - if (!g.dateWindow_ && !zoomedY) return; - context.isPanning = true; var xRange = g.xAxisRange(); context.dateRange = xRange[1] - xRange[0];