symbols!
This commit is contained in:
@@ -128,6 +128,7 @@ export class ForceNet {
|
||||
node_enter.append("use")
|
||||
.attr("xlink:href", d => this.get_symbol(d, "default"))
|
||||
.attr("class", "testcolor");
|
||||
|
||||
// {
|
||||
// for (var i=0, l=d.cats.length; i<l; i++) {
|
||||
// if (this.symbols[d.cats[i]]) {
|
||||
@@ -152,6 +153,7 @@ export class ForceNet {
|
||||
|
||||
node.classed("active", d=>d.active);
|
||||
|
||||
|
||||
this.simulation
|
||||
.nodes(graph.nodes)
|
||||
.on("tick", ticked);
|
||||
@@ -174,6 +176,10 @@ export class ForceNet {
|
||||
node
|
||||
.attr("transform", d => `translate(${d.x},${d.y})`);
|
||||
}
|
||||
|
||||
// document.querySelector("#page").style.background = "purple";
|
||||
// return;
|
||||
|
||||
this.update_nodes();
|
||||
this.update_forces();
|
||||
// this.simulation.alphaTarget(0.3).restart();
|
||||
|
||||
Reference in New Issue
Block a user