- isZooming : false,
- isPanning : false, // is this drag part of a pan?
- is2DPan : false, // if so, is that pan 1- or 2-dimensional?
- dragStartX : null,
- dragStartY : null,
- dragEndX : null,
- dragEndY : null,
- dragDirection : null,
- prevEndX : null,
- prevEndY : null,
- prevDragDirection : null,
-
- // TODO(danvk): update this comment
- // draggingDate and draggingValue represent the [date,value] point on the
- // graph at which the mouse was pressed. As the mouse moves while panning,
- // the viewport must pan so that the mouse position points to
- // [draggingDate, draggingValue]
- draggingDate : null,
+ isZooming: false,
+ isPanning: false, // is this drag part of a pan?
+ is2DPan: false, // if so, is that pan 1- or 2-dimensional?
+ dragStartX: null,
+ dragStartY: null,
+ dragEndX: null,
+ dragEndY: null,
+ dragDirection: null,
+ prevEndX: null,
+ prevEndY: null,
+ prevDragDirection: null,
+
+ // The value on the left side of the graph when a pan operation starts.
+ initialLeftmostDate: null,
+
+ // The number of units each pixel spans. (This won't be valid for log
+ // scales)
+ xUnitsPerPixel: null,