Skip to content

Commit

Permalink
fixed layout label activation #5
Browse files Browse the repository at this point in the history
  • Loading branch information
cpietsch committed Jun 8, 2019
1 parent 2e5879c commit b30c528
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@
</div>

<div class="navi hide">
<div class="time button active">time</div>
<div class="tsne button">similarity</div>
<div class="time button active" data="time">time</div>
<div class="tsne button" data="time">similarity</div>
</div>

<div class="infobar sneak">
Expand Down
8 changes: 4 additions & 4 deletions js/viz.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ function init() {

d3.selectAll(".navi .button")
.on("click", function () {
var that = this
var mode = d3.select(this).text()
canvas.setMode(mode)
timeline.setDisabled(mode != "time")
var that = this;
var mode = d3.select(this).attr("data");
canvas.setMode(mode);
timeline.setDisabled(mode != "time");

d3.selectAll(".navi .button").classed("active", function () {
return that === this
Expand Down

0 comments on commit b30c528

Please sign in to comment.