This commit is contained in:
Michael Murtaugh
2019-06-10 18:53:29 +02:00
parent 5a94d619d5
commit 21370661f7
9 changed files with 369 additions and 80 deletions

View File

@@ -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();

View File

@@ -45,7 +45,7 @@ export class SimpleMap {
async load_json (source) {
var data = await json(source);
// console.log("got data!", data);
// index the nodes by title, init link-arity count
var index = {};
this.nodes_by_title = index;