use icon instead of help button

This commit is contained in:
Oliver Gorwits
2012-12-06 18:47:18 +00:00
parent 4d74aa835b
commit cbecea8811
3 changed files with 28 additions and 25 deletions

View File

@@ -1,25 +1,10 @@
<div id="netmaphelp">
<button
class="btn btn-small btn-info" rel="popover"
data-title="Neighbor Map Controls"
data-html="true"
data-content="
<ul>
<li>Click and drag to pan</li>
<li>Mouse-wheel scroll to zoom</li>
<li>Hover to hightlight neighbors</li>
<li>Click to view device's map</li>
</ul>"
data-placement='top' data-trigger='click'>
Help
</button>
</div>
<script>
// show our help icon
d3.select('#netmap_help_img').style('display', 'inline');
var winHeight = window.innerHeight;
var winWidth = window.innerWidth;
var helpHeight = document.getElementById("netmaphelp").getBoundingClientRect().height;
var tree = d3.layout.tree()
.size([360, winHeight])
@@ -38,9 +23,9 @@ var loc = {};
var neighbors_data = {};
// main SVG background, with support for pan/zoom
var svg = d3.select("#netmap_pane").insert("svg", "#netmaphelp")
var svg = d3.select("#netmap_pane").append("svg")
.attr("width", winWidth - 50)
.attr("height", winHeight - (100 + helpHeight))
.attr("height", winHeight - 100)
.attr("pointer-events", "all")
.append('g')
.call(d3.behavior.zoom().on("zoom", redraw))