projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a bit more annotations cleanup
[dygraphs.git]
/
dygraph-interaction-model.js
diff --git
a/dygraph-interaction-model.js
b/dygraph-interaction-model.js
index
4d23eff
..
9b7feb5
100644
(file)
--- a/
dygraph-interaction-model.js
+++ b/
dygraph-interaction-model.js
@@
-374,7
+374,7
@@
Dygraph.Interaction.startTouch = function(event, g, context) {
// TODO(danvk): remove
dataX: 0.5 * (touches[0].dataX + touches[1].dataX),
// TODO(danvk): remove
dataX: 0.5 * (touches[0].dataX + touches[1].dataX),
- dataY: 0.5 * (touches[0].dataY + touches[1].dataY)
,
+ dataY: 0.5 * (touches[0].dataY + touches[1].dataY)
};
// Make pinches in a 45-degree swath around either axis 1-dimensional zooms.
};
// Make pinches in a 45-degree swath around either axis 1-dimensional zooms.
@@
-403,12
+403,12
@@
Dygraph.Interaction.startTouch = function(event, g, context) {
* @private
*/
Dygraph.Interaction.moveTouch = function(event, g, context) {
* @private
*/
Dygraph.Interaction.moveTouch = function(event, g, context) {
- var touches = [];
- for (
var
i = 0; i < event.touches.length; i++) {
+ var
i,
touches = [];
+ for (i = 0; i < event.touches.length; i++) {
var t = event.touches[i];
touches.push({
pageX: t.pageX,
var t = event.touches[i];
touches.push({
pageX: t.pageX,
- pageY: t.pageY
,
+ pageY: t.pageY
});
}
var initialTouches = context.initialTouches;
});
}
var initialTouches = context.initialTouches;
@@
-430,7
+430,7
@@
Dygraph.Interaction.moveTouch = function(event, g, context) {
// we toss it out for now, but could use it in the future.
var swipe = {
pageX: c_now.pageX - c_init.pageX,
// we toss it out for now, but could use it in the future.
var swipe = {
pageX: c_now.pageX - c_init.pageX,
- pageY: c_now.pageY - c_init.pageY
,
+ pageY: c_now.pageY - c_init.pageY
};
var dataWidth = context.initialRange.x[1] - context.initialRange.x[0];
var dataHeight = context.initialRange.y[0] - context.initialRange.y[1];
};
var dataWidth = context.initialRange.x[1] - context.initialRange.x[0];
var dataHeight = context.initialRange.y[0] - context.initialRange.y[1];
@@
-458,19
+458,19
@@
Dygraph.Interaction.moveTouch = function(event, g, context) {
if (context.touchDirections.x) {
g.dateWindow_ = [
c_init.dataX - swipe.dataX + (context.initialRange.x[0] - c_init.dataX) / xScale,
if (context.touchDirections.x) {
g.dateWindow_ = [
c_init.dataX - swipe.dataX + (context.initialRange.x[0] - c_init.dataX) / xScale,
- c_init.dataX - swipe.dataX + (context.initialRange.x[1] - c_init.dataX) / xScale
,
+ c_init.dataX - swipe.dataX + (context.initialRange.x[1] - c_init.dataX) / xScale
];
}
if (context.touchDirections.y) {
];
}
if (context.touchDirections.y) {
- for (
var
i = 0; i < 1 /*g.axes_.length*/; i++) {
+ for (i = 0; i < 1 /*g.axes_.length*/; i++) {
var axis = g.axes_[i];
if (axis.logscale) {
// TODO(danvk): implement
} else {
axis.valueWindow = [
c_init.dataY - swipe.dataY + (context.initialRange.y[0] - c_init.dataY) / yScale,
var axis = g.axes_[i];
if (axis.logscale) {
// TODO(danvk): implement
} else {
axis.valueWindow = [
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[1] - c_init.dataY) / yScale
];
}
}
];
}
}