Open NickRimer03 opened 5 years ago
The only way I found for now is to parse DOT by myself and to create graph like this:
const dotStr = "graph g { a--b; a--c; a--d; a--1f; }";
const g = new Graph({ directed: false, multigraph: true, compound: true });
g.setNode("a", "");
g.setNode("b", "");
g.setNode("c", "");
g.setNode("d", "");
g.setNode("1f", "");
g.setEdge("a", "b", "");
g.setEdge("a", "c", "");
g.setEdge("a", "d", "");
g.setEdge("a", "1f", "");
Result: ["a", "b", "c", "d", "1f"]
But it's not the way I wanted. Just wanna the original parser to work as expected.
UPD: of course another way is to force push random letter at the beginning of any of my IDs. But it is not the way my project lead wants :(
Ok, it 2+ months pass, but is it too hard to answer even a word? Just a simple "this is not a problem at all, this is only your local problem, 4uk off yourself, suffer and deal with it". Freaking easy.
Hi! This is an issue example:
And this is the result:
["1", "a", "b", "c", "d", "f"]
Five nodes ("a", "b", "c", "d", "1f") expected. Six nodes we have ("1f" transforms to "1" and "f"). If we draw this graph we'll see that node "a" will be connected to node "1" and node "f" will be in the air (disconnected graph).Another example. If dot-string will be like this:
const dotStr = "graph g { a--b; a--c; a--d; a--1b; a--1c; }";
the result is:["1", "a", "b", "c", "d"]
. Six nodes expected ("a", "b", "c", "d", "1b", "1c"). Five nodes we have ("1b" transforms to "1" and "b", "1c" transforms to "1" and "c" and then all "1" merges into one "1", also "b" and "c").This behavior is critically incorrect for me because of random string-number node IDs in project. Luckily all of them may starts with letter - and all is OK. But if there is a number on the first place in ID - all crashes.
I hope you'll fix it or help me to find any ways to fix this behavior.