shift+drag pans now, too. Chrome steals the alt+drag event to move the window
authorDan Vanderkam <danvdk@gmail.com>
Tue, 15 Dec 2009 23:05:07 +0000 (18:05 -0500)
committerDan Vanderkam <danvdk@gmail.com>
Tue, 15 Dec 2009 23:05:07 +0000 (18:05 -0500)
dygraph-combined.js
dygraph.js

index 4936efd..ffb56fb 100644 (file)
@@ -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;
 }
index 1383bcb..8858396 100644 (file)
@@ -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];