projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump to version 2 🎉
[dygraphs.git]
/
src
/
dygraph-interaction-model.js
diff --git
a/src/dygraph-interaction-model.js
b/src/dygraph-interaction-model.js
index
3813fc5
..
349fd3e
100644
(file)
--- a/
src/dygraph-interaction-model.js
+++ b/
src/dygraph-interaction-model.js
@@
-75,7
+75,7
@@
DygraphInteraction.startPan = function(event, g, context) {
context.initialLeftmostDate = utils.log10(xRange[0]);
context.dateRange = utils.log10(xRange[1]) - utils.log10(xRange[0]);
} else {
context.initialLeftmostDate = utils.log10(xRange[0]);
context.dateRange = utils.log10(xRange[1]) - utils.log10(xRange[0]);
} else {
- context.initialLeftmostDate = xRange[0];
+ context.initialLeftmostDate = xRange[0];
context.dateRange = xRange[1] - xRange[0];
}
context.xUnitsPerPixel = context.dateRange / (g.plotter_.area.w - 1);
context.dateRange = xRange[1] - xRange[0];
}
context.xUnitsPerPixel = context.dateRange / (g.plotter_.area.w - 1);
@@
-110,7
+110,7
@@
DygraphInteraction.startPan = function(event, g, context) {
}
// Record the range of each y-axis at the start of the drag.
}
// Record the range of each y-axis at the start of the drag.
- // If any axis has a valueRange
or valueWindow
, then we want a 2D pan.
+ // If any axis has a valueRange, then we want a 2D pan.
// We can't store data directly in g.axes_, because it does not belong to us
// and could change out from under us during a pan (say if there's a data
// update).
// We can't store data directly in g.axes_, because it does not belong to us
// and could change out from under us during a pan (say if there's a data
// update).
@@
-134,7
+134,7
@@
DygraphInteraction.startPan = function(event, g, context) {
context.axes.push(axis_data);
// While calculating axes, set 2dpan.
context.axes.push(axis_data);
// While calculating axes, set 2dpan.
- if (axis.value
Window || axis.value
Range) context.is2DPan = true;
+ if (axis.valueRange) context.is2DPan = true;
}
};
}
};
@@
-174,7
+174,7
@@
DygraphInteraction.movePan = function(event, g, context) {
g.dateWindow_ = [ Math.pow(utils.LOG_SCALE, minDate),
Math.pow(utils.LOG_SCALE, maxDate) ];
} else {
g.dateWindow_ = [ Math.pow(utils.LOG_SCALE, minDate),
Math.pow(utils.LOG_SCALE, maxDate) ];
} else {
- g.dateWindow_ = [minDate, maxDate];
+ g.dateWindow_ = [minDate, maxDate];
}
// y-axis scaling is automatic unless this is a full 2D pan.
}
// y-axis scaling is automatic unless this is a full 2D pan.
@@
-204,10
+204,10
@@
DygraphInteraction.movePan = function(event, g, context) {
}
}
if (g.attributes_.getForAxis("logscale", i)) {
}
}
if (g.attributes_.getForAxis("logscale", i)) {
- axis.value
Window
= [ Math.pow(utils.LOG_SCALE, minValue),
-
Math.pow(utils.LOG_SCALE, maxValue) ];
+ axis.value
Range
= [ Math.pow(utils.LOG_SCALE, minValue),
+ Math.pow(utils.LOG_SCALE, maxValue) ];
} else {
} else {
- axis.value
Window
= [ minValue, maxValue ];
+ axis.value
Range
= [ minValue, maxValue ];
}
}
}
}
}
}
@@
-536,7
+536,7
@@
DygraphInteraction.moveTouch = function(event, g, context) {
];
didZoom = true;
}
];
didZoom = true;
}
-
+
if (context.touchDirections.y) {
for (i = 0; i < 1 /*g.axes_.length*/; i++) {
var axis = g.axes_[i];
if (context.touchDirections.y) {
for (i = 0; i < 1 /*g.axes_.length*/; i++) {
var axis = g.axes_[i];
@@
-544,7
+544,7
@@
DygraphInteraction.moveTouch = function(event, g, context) {
if (logscale) {
// TODO(danvk): implement
} else {
if (logscale) {
// TODO(danvk): implement
} else {
- axis.value
Window
= [
+ axis.value
Range
= [
c_init.dataY - swipe.dataY + (context.initialRange.y[0] - c_init.dataY) / yScale,
c_init.dataY - swipe.dataY + (context.initialRange.y[1] - c_init.dataY) / yScale
];
c_init.dataY - swipe.dataY + (context.initialRange.y[0] - c_init.dataY) / yScale,
c_init.dataY - swipe.dataY + (context.initialRange.y[1] - c_init.dataY) / yScale
];