Rip out all the graphviz stuff

This commit is contained in:
Ian Gulliver
2019-07-10 20:34:44 +00:00
parent bc990c48d9
commit 04ec47e393
6 changed files with 0 additions and 61 deletions

View File

@@ -4,8 +4,6 @@ class EditorEntryBase extends ListenUtils {
constructor() {
super();
this.id = randStr64();
this.elem_ = document.createElement('li');
this.elem_.tabIndex = 0;
this.listen(this.elem_, 'focus', () => this.onElemFocus());

View File

@@ -27,25 +27,6 @@ class EditorGroup extends EditorEntryBase {
};
}
exportGraphviz() {
let lines = [
'subgraph "cluster_' + this.id + '" {',
];
if (this.getLabel() != '') {
lines.push('\tlabel = "' + this.getLabel() + '";');
}
for (let obj of this.nodes) {
for (let line of obj.exportGraphviz()) {
lines.push('\t' + line);
}
}
lines.push('}');
return lines;
}
getNodes() {
return this.nodes_.getEntries(EditorNode);
}

View File

@@ -24,10 +24,6 @@ class EditorLabel extends EditorEntryBase {
};
}
exportGraphviz() {
return [];
}
getLabel() {
return this.input_.value;
}

View File

@@ -29,26 +29,6 @@ class EditorLink extends EditorEntryBase {
};
}
exportGraphviz() {
if (this.getFrom().getLabel() == '' || this.getTo().getLabel() == '') {
return [];
}
let label = '';
if (this.getLabel() != '') {
label = ' [label="' + this.getLabel() + '"]';
}
let ret = [];
for (let from of this.from) {
for (let to of this.to) {
ret.push('"' + from.id + '" -> "' + to.id + '"' + label + ';');
}
}
return ret;
};
getFrom() {
return this.nodes_.getEntries(EditorNode)[0];
}

View File

@@ -23,13 +23,6 @@ class EditorNode extends EditorEntryBase {
};
}
exportGraphviz() {
if (this.getLabel() == '') {
return [];
}
return ['"' + this.id + '" [label="' + this.getLabel() + '"];'];
}
getLabel() {
return this.input_.value;
}

View File

@@ -1,12 +1,3 @@
function randStr32() {
let num = Math.floor(Math.random() * Math.pow(2, 32));
return num.toString(16).padStart(8, '0');
}
function randStr64() {
return randStr32() + randStr32();
}
function getOrSet(container, key, newValue) {
let val = container.get(key);
if (!val) {