Added support for nested subgraphs in grammar, part 1 of issue #161

This commit is contained in:
knsv
2015-05-09 19:05:47 +02:00
parent 594e69dd93
commit ae6bb57cf5
5 changed files with 23 additions and 11 deletions

View File

@@ -29,7 +29,7 @@ exports.addVertex = function (id, text, type, style) {
vertices[id] = {id: id, styles: [], classes:[]};
}
if (typeof text !== 'undefined') {
vertices[id].text = text;
vertices[id].text = text.trim();
}
if (typeof type !== 'undefined') {
vertices[id].type = type;
@@ -59,7 +59,7 @@ exports.addLink = function (start, end, type, linktext) {
linktext = type.text;
if (typeof linktext !== 'undefined') {
edge.text = linktext;
edge.text = linktext.trim();
}
if (typeof type !== 'undefined') {