Skip to content

Commit

Permalink
Bending of lines works properly now
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasKappa committed Nov 16, 2019
1 parent cbf6ded commit a6dcf1e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/FFC/ffc.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ function compile(graph, options) {
bend.push('');
}
} else {
// If the transition is not straight
//If the transition is not straight
if (!((t.x + t.y) == 0)) {
let dir = getDirection(stateIDCollection[t.Source], stateIDCollection[t.Target]);
if (((t.x + t.y) > 0 && (dir == DIRECTIONS['right'] || dir == DIRECTIONS['top'])) ||
Expand All @@ -334,6 +334,17 @@ function compile(graph, options) {

}
}
for (const s of states) {
for (const t of s.Transitions) {
for (const bend of bendTransitions) {
if (bend[0] != bend[1]) {
if ((bend[1] == t.Source && bend[0] == t.Target)) {
bend[2] = '[line=left]';
}
}
}
}
}
for (const s of states) {
for (const t of s.Transitions) {
let labels = ``;
Expand Down

0 comments on commit a6dcf1e

Please sign in to comment.