Remove broken graphviz export

This commit is contained in:
Ian Gulliver
2019-07-03 22:27:40 +00:00
parent 5591ec6f54
commit 22960e57b0

View File

@@ -8,7 +8,6 @@ class Architype {
// TODO: make theme selectable
this.container_.classList.add('dark');
this.container_.addEventListener('keydown', (e) => { this.onKeyDown(e); });
addEventListener('resize', (e) => { this.onResize(e); });
let editorElem = document.createElement('ul');
@@ -109,36 +108,10 @@ class Architype {
render.postMessage(this.serialized_);
}
onKeyDown(e) {
switch (e.key) {
case 'z':
this.exportGraphviz();
break;
}
}
onResize(e) {
this.fixSizes();
}
exportGraphviz() {
let lines = [
'digraph G {',
'\trankdir = "LR";',
];
for (let type of ['nodes', 'links', 'groups']) {
for (let obj of this.graph_[type]) {
for (let line of obj.exportGraphviz()) {
lines.push('\t' + line);
}
}
}
lines.push('}');
navigator.clipboard.writeText(lines.join('\n'));
}
draw(steps) {
this.grid_.innerHTML = '';
this.gridNodes_ = [];