Add background color slider

This commit is contained in:
John Firebaugh
2013-01-30 10:45:24 -05:00
parent 17007b0661
commit 7f0b449307
+14 -1
View File
@@ -4,7 +4,6 @@
<meta charset='utf-8'>
<title>Rendering Tests</title>
<link rel="stylesheet" href="../css/map.css">
<style>body { background-color: #888; }</style>
</head>
<body>
<!-- include source files here... -->
@@ -35,6 +34,20 @@
<script src='../js/id/graph/relation.js'></script>
<script src='../js/id/graph/way.js'></script>
<form style="position: fixed; right: 10px; bottom: 10px">
<input id="background-color" type="range" min="0" max="255" value="255">
<label for="background-color">Background Color</label>
</form>
<script>
var bg = d3.select("#background-color")
.on("change", function () {
var v = bg.property("value");
d3.select("body")
.style("background-color", d3.rgb(v,v,v));
});
</script>
<table>
<thead>
<tr><th></th><th colspan="3">z16</th><th colspan="3">z17</th></tr>