add the magic <meta> tag for IE8+9
[dygraphs.git] / tests / interaction.html
index e6d103e..e9361fd 100644 (file)
@@ -1,6 +1,7 @@
-
+<!DOCTYPE html>
 <html>
   <head>
+    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
     <title>interaction model</title>
     <!--[if IE]>
     <script type="text/javascript" src="../excanvas.js"></script>
@@ -26,7 +27,7 @@
     <tr><td>
     <b>Custom interaction model</b>
 
-    <input type="button" value="Unzoom" onclick="unzoomGraph(g3)">
+    <input type="button" value="Restore position" onclick="restorePositioning(g3)">
     <div id="div_g3" style="width:600px; height:300px;"></div>
     </td><td>
     Zoom in: double-click, scroll wheel<br/>
@@ -46,6 +47,8 @@
     </table>
         
     <script type="text/javascript">
+      Dygraph.addEvent(document, "mousewheel", function() { lastClickedGraph = null; });
+      Dygraph.addEvent(document, "click", function() { lastClickedGraph = null; });
       var g = new Dygraph(document.getElementById("div_g"),
            NoisyData, { errorBars : true });
       var g2 = new Dygraph(document.getElementById("div_g2"),
@@ -55,6 +58,7 @@
         'mousedown' : downV3,
         'mousemove' : moveV3,
         'mouseup' : upV3,
+        'click' : clickV3,
         'dblclick' : dblClickV3,
         'mousewheel' : scrollV3
       }});