Handle global label

This commit is contained in:
Ian Gulliver
2019-07-10 22:05:32 +00:00
parent 4fa89d4237
commit 1ef19ad751
5 changed files with 52 additions and 4 deletions

View File

@@ -6,6 +6,7 @@ class Graph {
this.groups = [];
this.links = [];
this.nodes = [];
this.label = null;
this.processList(def.editor);
this.removeSoftNodes();
@@ -30,6 +31,10 @@ class Graph {
this.processGroup(item);
break;
case 'label':
this.processLabel(item);
break;
case 'link':
this.processLink(item);
break;
@@ -49,6 +54,13 @@ class Graph {
this.processList(item.members, true);
}
processLabel(item) {
if (item.label == '') {
return;
}
this.label = item.label;
}
processLink(item) {
let link = GraphLink.process(item);
if (!link) {