Skip to content

Commit 4f9ada3

Browse files
committed
use newest lib
1 parent 6b8ee20 commit 4f9ada3

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

flowchart-latest.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// flowchart, v1.2.3
1+
// flowchart, v1.2.4
22
// Copyright (c)2013 Adriano Raiano (adrai).
33
// Distributed under MIT license
44
// http://adrai.github.io/flowchart.js
@@ -503,12 +503,10 @@
503503
};
504504

505505
Symbol.prototype.drawLineTo = function(symbol, text, origin) {
506-
if (this.connectedTo.indexOf(symbol) >= 0) {
507-
return;
506+
if (this.connectedTo.indexOf(symbol) < 0) {
507+
this.connectedTo.push(symbol);
508508
}
509509

510-
this.connectedTo.push(symbol);
511-
512510
var x = this.getCenter().x,
513511
y = this.getCenter().y,
514512
top = this.getTop(),
@@ -558,6 +556,16 @@
558556
this.rightStart = true;
559557
symbol.topEnd = true;
560558
maxX = right.x + this.chart.options['line-length']/2;
559+
} else if ((!origin || origin === 'right') && isOnSameColumn && isUnder) {
560+
line = drawLine(this.chart, right, [
561+
{x: right.x + this.chart.options['line-length']/2, y: right.y},
562+
{x: right.x + this.chart.options['line-length']/2, y: symbolTop.y - this.chart.options['line-length']/2},
563+
{x: symbolTop.x, y: symbolTop.y - this.chart.options['line-length']/2},
564+
{x: symbolTop.x, y: symbolTop.y}
565+
], text);
566+
this.rightStart = true;
567+
symbol.topEnd = true;
568+
maxX = right.x + this.chart.options['line-length']/2;
561569
} else if ((!origin || origin === 'bottom') && isLeft) {
562570
if (this.leftEnd && isUpper) {
563571
line = drawLine(this.chart, bottom, [
@@ -1006,7 +1014,8 @@
10061014
if (prevDisp instanceof(Condition)) {
10071015
if (prev.yes === s) {
10081016
prevDisp.yes(dispSymb);
1009-
} else if (prev.no === s) {
1017+
}
1018+
if (prev.no === s) {
10101019
prevDisp.no(dispSymb);
10111020
}
10121021
} else {

0 commit comments

Comments
 (0)