X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=gallery%2Finteraction-api.js;h=8f6d706dbdf49575e69fe43dea86f38242a95762;hb=64f1c4dfd7425931fcd1bd9949157c0ba6958656;hp=603dece46859987d20cfc28fa202b134441749db;hpb=5a46df4c8041636edfb09702b43d62126c066911;p=dygraphs.git diff --git a/gallery/interaction-api.js b/gallery/interaction-api.js index 603dece..8f6d706 100644 --- a/gallery/interaction-api.js +++ b/gallery/interaction-api.js @@ -1,3 +1,4 @@ +/*global Dygraph */ // Code for a variety of interaction models. Used in interaction.html, but split out from // that file so they can be tested in isolation. // @@ -83,7 +84,7 @@ var lastClickedGraph = null; function clickV3(event, g, context) { lastClickedGraph = g; - Dygraph.cancelEvent(event); + event.preventDefault();; } function scrollV3(event, g, context) { @@ -105,7 +106,7 @@ function scrollV3(event, g, context) { var yPct = percentages[1]; zoom(g, percentage, xPct, yPct); - Dygraph.cancelEvent(event); + event.preventDefault(); } // Adjusts [x, y] toward each other by zoomInPercentage%