Export Code
Connected
README.md
working.js
import { select, json, zoom, drag, event } from 'd3';
// import { createContextMenu } from './contextMenu.js';

//----------------------------------------
//------------------------------------------
// Adjaceny List Class
//-------------------------------------------
class Graph {
constructor() {
this.t = new Map();
}
addEdge(node1, node2) {
const s = this.t.get(node1);
if (s == null) this.t.set(node1, new Set([node2]));
else s.add(node2);
}
getAdjacencies(node) {
var z = this.t.get(node);
if (z == null) {
z = new Set();
}
return z;
}
*dir(node, path = Array(), visited = new Set()) {
yield [...path, node];
path.push(node);
visited.add(node);
for (const adj of this.getAdjacencies(node)) {
if (!visited.has(adj)) {
yield* this.dir(adj, path, visited);
}
}
path.pop();
}
*dirs(nodes) {
for (const node of nodes) {

Temp 2 Level

brettforbes

Last edited Jun 17, 2024
Created on Jun 15, 2024
Forked from OS-Threat UI v2

There are two different panes:

  1. Promotable: Objects and their sub=graphs that can be promoted
  2. Scratch: Other types of objects
MIT Licensed