X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=gallery%2Finteraction.js;h=5936189f363d78dea5ef2c69623a3f70288d98ba;hb=319d0361d2e512ed8049dfedffd79254e491201c;hp=05b0c804fcc3847fa82a1910b8ff83dd7e16c72a;hpb=e1e80cce232a1efbebc1e3dbe236ecf957464c68;p=dygraphs.git diff --git a/gallery/interaction.js b/gallery/interaction.js index 05b0c80..5936189 100644 --- a/gallery/interaction.js +++ b/gallery/interaction.js @@ -1,3 +1,6 @@ +/*global Gallery,Dygraph,data */ +/*global NoisyData,downV3,moveV3,upV3,clickV3,dblClickV3,scrollV3,restorePositioning,downV4,moveV4,upV4,dblClickV4,captureCanvas */ + Gallery.register( 'interaction', { @@ -46,13 +49,13 @@ Gallery.register( }, run: function() { + var lastClickedGraph; // TODO(konigsberg): Add cleanup to remove callbacks. Dygraph.addEvent(document, "mousewheel", function() { lastClickedGraph = null; }); Dygraph.addEvent(document, "click", function() { lastClickedGraph = null; }); - var g = new Dygraph(document.getElementById("div_g"), + new Dygraph(document.getElementById("div_g"), NoisyData, { errorBars : true }); - var s = document.getElementById("g2_console"); - var g2 = new Dygraph(document.getElementById("div_g2"), + new Dygraph(document.getElementById("div_g2"), NoisyData, { errorBars : true, @@ -70,7 +73,7 @@ Gallery.register( document.getElementById("restore3").onclick = function() { restorePositioning(g3); }; - var g4 = new Dygraph(document.getElementById("div_g4"), + new Dygraph(document.getElementById("div_g4"), NoisyData, { errorBars : true, drawPoints : true,