Skip to content

Commit 39020a4

Browse files
committed
new version
1 parent 9b6e6cd commit 39020a4

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

flowchart-latest.js

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// flowchart, v1.2.9
1+
// flowchart, v1.2.10
22
// Copyright (c)2014 Adriano Raiano (adrai).
33
// Distributed under MIT license
44
// http://adrai.github.io/flowchart.js
@@ -432,7 +432,7 @@
432432
this.connectedTo = [];
433433
this.symbolType = options.symbolType;
434434

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;
436436

437437
this.text = this.chart.paper.text(0, 0, options.text);
438438
this.text.attr({
@@ -976,16 +976,16 @@
976976

977977
this.yes_direction = 'bottom';
978978
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') {
981981
this.no_direction = 'bottom';
982982
this.yes_direction = 'right';
983983
} else {
984984
this.no_direction = 'right';
985985
this.yes_direction = 'bottom';
986986
}
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') {
989989
this.yes_direction = 'bottom';
990990
this.no_direction = 'right';
991991
} else {
@@ -1314,7 +1314,7 @@
13141314
var realSymb = getSymbol(flowSymb);
13151315
var next = getNextPath(flowSymb);
13161316

1317-
var direction;
1317+
var direction = null;
13181318
if (next.indexOf(',') >= 0) {
13191319
var condOpt = next.split(',');
13201320
next = condOpt[0];
@@ -1328,15 +1328,13 @@
13281328
if (i + 1 < lenS) {
13291329
var nextSymb = flowSymbols[i + 1];
13301330
realSymb[next] = getSymbol(nextSymb);
1331-
realSymb[next].direction = direction;
1332-
direction = undefined;
1331+
realSymb['direction_' + next] = direction;
1332+
direction = null;
13331333
}
13341334
}
1335-
13361335
}
13371336

13381337
}
1339-
13401338
return chart;
13411339
}
13421340
// public api interface

0 commit comments

Comments
 (0)