Skip to content

Commit c30c0a6

Browse files
committed
fix colorOptions in playground
1 parent d1ff172 commit c30c0a6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

app/index.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ <h5 class="mb-0">
363363
</div>
364364
<div class="form-group">
365365
<label for="colorMode">Color Mode</label>
366-
<select id="colorMode" class="form-control form-control-sm"></select>
366+
<select id="colorMode" class="form-control form-control-sm skip"></select>
367367
</div>
368368
</div>
369369
</div>
@@ -677,6 +677,13 @@ <h5 class="modal-title" id="exportModalLabel">Export</h5>
677677
tree.setAnimation(cached);
678678
});
679679

680+
// im considering how to change the coloroptions as part of this form
681+
// maybe ill make a color section, separate of leaves and branches etc
682+
// for now ill do this and let it grow
683+
d3.select("#colorMode").on("input", function() {
684+
tree.setColorOptions({ colorMode: this.value });
685+
});
686+
680687
d3.select("#branchNodeSize").on("input", function() {
681688
tree.eachBranchNode((node, data) => {
682689
d3.select(node).attr("r", this.value);

0 commit comments

Comments
 (0)