From 1469cb506b3ff507df1cb0da673b24fd001bd7ac Mon Sep 17 00:00:00 2001 From: Kasra Date: Sun, 15 May 2016 14:10:36 +0430 Subject: [PATCH] Add ability of multiple inputs or outputs to each operator. --- jquery.flowchart.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jquery.flowchart.js b/jquery.flowchart.js index 85ff68a..5871bac 100644 --- a/jquery.flowchart.js +++ b/jquery.flowchart.js @@ -210,16 +210,17 @@ $(function() { if (!multipleLinksOnOutput || !multipleLinksOnInput) { for (var linkId2 in this.data.links) { var currentLink = this.data.links[linkId2]; + var currentOperator = this.data.operators[currentLink.fromOperator]; var currentSubConnectors = this._getSubConnectors(currentLink); var currentFromSubConnector = currentSubConnectors[0]; var currentToSubConnector = currentSubConnectors[1]; - if (!multipleLinksOnOutput && currentLink.fromOperator == linkData.fromOperator && currentLink.fromConnector == linkData.fromConnector && currentFromSubConnector == fromSubConnector) { + if (!multipleLinksOnOutput && !currentOperator.properties.multipleLinksOnOutput && currentLink.fromOperator == linkData.fromOperator && currentLink.fromConnector == linkData.fromConnector && currentFromSubConnector == fromSubConnector) { this.deleteLink(linkId2); continue; } - if (!multipleLinksOnInput && currentLink.toOperator == linkData.toOperator && currentLink.toConnector == linkData.toConnector && currentToSubConnector == toSubConnector) { + if (!multipleLinksOnInput && !currentOperator.properties.multipleLinksOnInput && currentLink.toOperator == linkData.toOperator && currentLink.toConnector == linkData.toConnector && currentToSubConnector == toSubConnector) { this.deleteLink(linkId2); continue; }