X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=tests%2Finteraction.js;h=4b852114c2e540b35366dc5b3c4daf25c143a206;hb=464b5f504e75c5d2b98eff12b3b8ad520a1729cb;hp=08efc6fe98b2b914407cd7005023a21b9e7c5bd3;hpb=70d47e7c9564e190f29f6a8bb1f4c547bef8781a;p=dygraphs.git diff --git a/tests/interaction.js b/tests/interaction.js index 08efc6f..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: