summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjiteshjha2016-06-17 00:02:56 +0530
committerjiteshjha2016-06-17 00:02:56 +0530
commit3083493c43bc1de7cd6974d312d4110bfd379cd9 (patch)
tree908e2dfc532fb871f76fb499e69b915f15eb4358
parentfd4e61c86972dec0dba3d6f1c32ce88882e26153 (diff)
downloadxcos-on-web-3083493c43bc1de7cd6974d312d4110bfd379cd9.tar.gz
xcos-on-web-3083493c43bc1de7cd6974d312d4110bfd379cd9.tar.bz2
xcos-on-web-3083493c43bc1de7cd6974d312d4110bfd379cd9.zip
Removed redundant null statements
-rw-r--r--index.html13
1 files changed, 5 insertions, 8 deletions
diff --git a/index.html b/index.html
index a8ca32c..43c4806 100644
--- a/index.html
+++ b/index.html
@@ -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.