Move (copy, so far) all the digraph code in Graph

This commit is contained in:
Ian Gulliver
2019-07-03 03:19:23 +00:00
parent 0daf666fee
commit df432eeeba
3 changed files with 329 additions and 1 deletions

View File

@@ -66,8 +66,11 @@ class Architype {
}
onChange(e) {
let serialized = this.serialize();
onmessage(serialized);
localStorage.setItem('currentState', JSON.stringify(serialized));
this.graph_ = this.buildGraph();
localStorage.setItem('currentState', JSON.stringify(this.serialize()));
this.buildGrid(this.graph_);
this.updateTargets(this.graph_);
this.fixSizes(this.graph_.nodes);
@@ -544,6 +547,8 @@ class Architype {
<!--# include file="EditorLink.js" -->
<!--# include file="EditorNode.js" -->
<!--# include file="Graph.js" -->
<!--# include file="utils.js" -->
new Architype(document.getElementById('architype'));