mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-19 15:08:23 +02:00
Add background color slider
This commit is contained in:
+14
-1
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user