X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=tests%2Finteraction.js;h=4b852114c2e540b35366dc5b3c4daf25c143a206;hb=e988d192a87ace02365a765ffd5455b1d7b5b88e;hp=c98c4456ddb58584b39796af9769e721c8e71513;hpb=417af431300573b3069ddcb9b9b26cd3cb40c051;p=dygraphs.git diff --git a/tests/interaction.js b/tests/interaction.js index c98c445..4b85211 100644 --- a/tests/interaction.js +++ b/tests/interaction.js @@ -149,8 +149,9 @@ function moveV4(event, g, context) { 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: @@ -195,7 +196,7 @@ function upV4(event, g, context) { } function dblClickV4(event, g, context) { - restorePositioning(g4); + restorePositioning(g); } function drawV4(x, y) {