Skip to content

Commit ac050f0

Browse files
committed
Clean up elements before plotting new region
1 parent c7def8e commit ac050f0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<link rel="stylesheet" type=text/css href="css/viz.css">
1212

1313
<body id="demo">
14-
<div id="header"> </div>
14+
<div id="header"></div>
1515
<div id="plots"></div>
1616
</body>
1717

js/viz.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ bb.viz = function(data) {
1414
.chrm(chrm)
1515
.step(2);
1616

17+
plots.selectAll().remove();
18+
d3.select(".current-region").remove();
19+
1720
main.append("div")
1821
.attr("class", "current-region")
1922
.text(chrm + ":" + start + "-" + stop);

0 commit comments

Comments
 (0)