|
1 |
| -// flowchart, v1.2.9 |
| 1 | +// flowchart, v1.2.10 |
2 | 2 | // Copyright (c)2014 Adriano Raiano (adrai).
|
3 | 3 | // Distributed under MIT license
|
4 | 4 | // http://adrai.github.io/flowchart.js
|
|
432 | 432 | this.connectedTo = [];
|
433 | 433 | this.symbolType = options.symbolType;
|
434 | 434 |
|
435 |
| - this.next_direction = options.next && options.next.direction ? options.next.direction : undefined; |
| 435 | + this.next_direction = options.next && options['direction_next'] ? options['direction_next'] : undefined; |
436 | 436 |
|
437 | 437 | this.text = this.chart.paper.text(0, 0, options.text);
|
438 | 438 | this.text.attr({
|
|
976 | 976 |
|
977 | 977 | this.yes_direction = 'bottom';
|
978 | 978 | this.no_direction = 'right';
|
979 |
| - if (options.yes && options.yes.direction && options.no && !options.no.direction) { |
980 |
| - if (options.yes.direction === 'right') { |
| 979 | + if (options.yes && options['direction_yes'] && options.no && !options['direction_no']) { |
| 980 | + if (options['direction_yes'] === 'right') { |
981 | 981 | this.no_direction = 'bottom';
|
982 | 982 | this.yes_direction = 'right';
|
983 | 983 | } else {
|
984 | 984 | this.no_direction = 'right';
|
985 | 985 | this.yes_direction = 'bottom';
|
986 | 986 | }
|
987 |
| - } else if (options.yes && !options.yes.direction && options.no && options.no.direction) { |
988 |
| - if (options.no.direction === 'right') { |
| 987 | + } else if (options.yes && !options['direction_yes'] && options.no && options['direction_no']) { |
| 988 | + if (options['direction_no'] === 'right') { |
989 | 989 | this.yes_direction = 'bottom';
|
990 | 990 | this.no_direction = 'right';
|
991 | 991 | } else {
|
|
1314 | 1314 | var realSymb = getSymbol(flowSymb);
|
1315 | 1315 | var next = getNextPath(flowSymb);
|
1316 | 1316 |
|
1317 |
| - var direction; |
| 1317 | + var direction = null; |
1318 | 1318 | if (next.indexOf(',') >= 0) {
|
1319 | 1319 | var condOpt = next.split(',');
|
1320 | 1320 | next = condOpt[0];
|
|
1328 | 1328 | if (i + 1 < lenS) {
|
1329 | 1329 | var nextSymb = flowSymbols[i + 1];
|
1330 | 1330 | realSymb[next] = getSymbol(nextSymb);
|
1331 |
| - realSymb[next].direction = direction; |
1332 |
| - direction = undefined; |
| 1331 | + realSymb['direction_' + next] = direction; |
| 1332 | + direction = null; |
1333 | 1333 | }
|
1334 | 1334 | }
|
1335 |
| - |
1336 | 1335 | }
|
1337 | 1336 |
|
1338 | 1337 | }
|
1339 |
| - |
1340 | 1338 | return chart;
|
1341 | 1339 | }
|
1342 | 1340 | // public api interface
|
|
0 commit comments