projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add the magic <meta> tag for IE8+9
[dygraphs.git]
/
tests
/
crosshair.html
diff --git
a/tests/crosshair.html
b/tests/crosshair.html
index
e6c4adf
..
390f1e7
100644
(file)
--- a/
tests/crosshair.html
+++ b/
tests/crosshair.html
@@
-1,8
+1,10
@@
+<!DOCTYPE html>
<html>
<head>
<html>
<head>
+ <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
<title>crosshairs</title>
<!--[if IE]>
<title>crosshairs</title>
<!--[if IE]>
- <script type="text/javascript" src="excanvas.js"></script>
+ <script type="text/javascript" src="
../
excanvas.js"></script>
<![endif]-->
<script type="text/javascript" src="../strftime/strftime-min.js"></script>
<script type="text/javascript" src="../rgbcolor/rgbcolor.js"></script>
<![endif]-->
<script type="text/javascript" src="../strftime/strftime-min.js"></script>
<script type="text/javascript" src="../rgbcolor/rgbcolor.js"></script>
@@
-28,16
+30,25
@@
highlightCallback: function(e, x, pts) {
for (var i = 0; i < pts.length; i++) {
var y = pts[i].canvasy;
highlightCallback: function(e, x, pts) {
for (var i = 0; i < pts.length; i++) {
var y = pts[i].canvasy;
+ lines[i].style.display = "";
lines[i].style.top = y + "px";
if (i == 0) xline.style.left = pts[i].canvasx + "px";
}
lines[i].style.top = y + "px";
if (i == 0) xline.style.left = pts[i].canvasx + "px";
}
+ xline.style.display = "";
+ },
+ unhighlightCallback: function(e) {
+ for (var i = 0; i < 2; i++) {
+ lines[i].style.display = "none";
+ }
+ xline.style.display = "none";
}
}
);
for (var i = 0; i < 2; i++) {
var line = document.createElement("div");
}
}
);
for (var i = 0; i < 2; i++) {
var line = document.createElement("div");
+ line.style.display = "none";
line.style.width = "100%";
line.style.height = "1px";
line.style.backgroundColor = "black";
line.style.width = "100%";
line.style.height = "1px";
line.style.backgroundColor = "black";
@@
-47,6
+58,7
@@
}
xline = document.createElement("div");
}
xline = document.createElement("div");
+ xline.style.display = "none";
xline.style.width = "1px";
xline.style.height = "100%";
xline.style.top = "0px";
xline.style.width = "1px";
xline.style.height = "100%";
xline.style.top = "0px";