diff options
author | jiteshjha | 2016-06-17 00:02:56 +0530 |
---|---|---|
committer | jiteshjha | 2016-06-17 00:02:56 +0530 |
commit | 3083493c43bc1de7cd6974d312d4110bfd379cd9 (patch) | |
tree | 908e2dfc532fb871f76fb499e69b915f15eb4358 | |
parent | fd4e61c86972dec0dba3d6f1c32ce88882e26153 (diff) | |
download | xcos-on-web-3083493c43bc1de7cd6974d312d4110bfd379cd9.tar.gz xcos-on-web-3083493c43bc1de7cd6974d312d4110bfd379cd9.tar.bz2 xcos-on-web-3083493c43bc1de7cd6974d312d4110bfd379cd9.zip |
Removed redundant null statements
-rw-r--r-- | index.html | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -278,31 +278,28 @@ } else if(edgeSource.value == "ExplicitOutputPort" && target.value != "ExplicitInputPort") { alert("Explicit data output port must be connected to explicit data input port"); - return null; } else if(edgeSource.value == "ExplicitInputPort" && target.value != "ExplicitOutputPort") { alert("Explicit data input port must be connected to explicit data output port"); - return null; } else if(edgeSource.value == "ImplicitOutputPort" && target.value != "ImplicitInputPort") { alert("Implicit data output port must be connected to implicit data input port"); - return null; } else if(edgeSource.value == "ImplicitInputPort" && target.value != "ImplicitOutputPort") { alert("Implicit data input port must be connected to implicit data output port"); - return null; } else if(edgeSource.value == "CommandPort" && target.value != "ControlPort") { alert("Command port must be connected to control port"); - return null; } else if(edgeSource.value == "ControlPort" && target.value != "CommandPort") { alert("Control port must be connected to command port"); - return null; + } + else { + // If the edge is legit, return the edge. + return mxGraph.prototype.addEdge.apply(this, arguments); } - // If the edge is legit, return the edge. - return mxGraph.prototype.addEdge.apply(this, arguments); + return null; } // Disables drag-and-drop into non-swimlanes. |