projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add new issue and PR templates
[dygraphs.git]
/
tests
/
interaction.js
diff --git
a/tests/interaction.js
b/tests/interaction.js
index
c98c445
..
6ce65a8
100644
(file)
--- a/
tests/interaction.js
+++ b/
tests/interaction.js
@@
-83,7
+83,8
@@
var lastClickedGraph = null;
function clickV3(event, g, context) {
lastClickedGraph = g;
function clickV3(event, g, context) {
lastClickedGraph = g;
- Dygraph.cancelEvent(event);
+ event.preventDefault();
+ event.stopPropagation();
}
function scrollV3(event, g, context) {
}
function scrollV3(event, g, context) {
@@
-105,7
+106,8
@@
function scrollV3(event, g, context) {
var yPct = percentages[1];
zoom(g, percentage, xPct, yPct);
var yPct = percentages[1];
zoom(g, percentage, xPct, yPct);
- Dygraph.cancelEvent(event);
+ event.preventDefault();
+ event.stopPropagation();
}
// Adjusts [x, y] toward each other by zoomInPercentage%
}
// Adjusts [x, y] toward each other by zoomInPercentage%
@@
-149,8
+151,9
@@
function moveV4(event, g, context) {
var RANGE = 7;
if (v4Active) {
var RANGE = 7;
if (v4Active) {
- var canvasx = Dygraph.pageX(event) - Dygraph.findPosX(g.graphDiv);
- var canvasy = Dygraph.pageY(event) - Dygraph.findPosY(g.graphDiv);
+ var graphPos = Dygraph.findPos(g.graphDiv);
+ var canvasx = Dygraph.pageX(event) - graphPos.x;
+ var canvasy = Dygraph.pageY(event) - graphPos.y;
var rows = g.numRows();
// Row layout:
var rows = g.numRows();
// Row layout:
@@
-195,7
+198,7
@@
function upV4(event, g, context) {
}
function dblClickV4(event, g, context) {
}
function dblClickV4(event, g, context) {
- restorePositioning(g
4
);
+ restorePositioning(g);
}
function drawV4(x, y) {
}
function drawV4(x, y) {