From 2dab69c39d573bea797d8d9f39907b2d356c3464 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Tue, 15 Dec 2009 18:05:07 -0500 Subject: [PATCH] shift+drag pans now, too. Chrome steals the alt+drag event to move the window --- dygraph-combined.js | 2 +- dygraph.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dygraph-combined.js b/dygraph-combined.js index 4936efd..ffb56fb 100644 --- a/dygraph-combined.js +++ b/dygraph-combined.js @@ -786,7 +786,7 @@ px=Dygraph.findPosX(self.canvas_); py=Dygraph.findPosY(self.canvas_); _128=getX(_140); _129=getY(_140); -if(_140.altKey){ +if(_140.altKey||_140.shiftKey){ if(!self.dateWindow_){ return; } diff --git a/dygraph.js b/dygraph.js index 1383bcb..8858396 100644 --- a/dygraph.js +++ b/dygraph.js @@ -570,7 +570,7 @@ Dygraph.prototype.createDragInterface_ = function() { dragStartX = getX(event); dragStartY = getY(event); - if (event.altKey) { + if (event.altKey || event.shiftKey) { if (!self.dateWindow_) return; // have to be zoomed in to pan. isPanning = true; dateRange = self.dateWindow_[1] - self.dateWindow_[0]; -- 2.7.4