X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=gallery%2Finteraction-api.js;h=8f6d706dbdf49575e69fe43dea86f38242a95762;hb=0bc4cb546af5d1ce157ad701a45169cc07c9c839;hp=603dece46859987d20cfc28fa202b134441749db;hpb=e1e80cce232a1efbebc1e3dbe236ecf957464c68;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%