summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'index.html')
-rw-r--r--index.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/index.html b/index.html
index fc83c08..9c1cedb 100644
--- a/index.html
+++ b/index.html
@@ -609,6 +609,24 @@
alert("Control port must be connected to command port");
}
else {
+
+ if((source.value.indexOf('Input') != -1 && target.value.indexOf('Output') != -1)
+ || (target.value == 'CommandPort' && source.value == 'ControlPort')) {
+ console.log('sdsd');
+ graph.getModel().beginUpdate();
+ try {
+ var newEdge = graph.insertEdge(parent, null, '', target, source);
+ var waypoints = edgeState.absolutePoints;
+ waypoints.reverse();
+ newEdge.geometry.points = waypoints;
+ }
+ finally {
+ graph.getModel().endUpdate();
+ }
+
+ return null;
+ console.log('dsd');
+ }
// If the edge is legit, return the edge.
return mxGraph.prototype.addEdge.apply(this, arguments);
}