diff options
author | jiteshjha | 2016-07-06 12:37:48 +0530 |
---|---|---|
committer | jiteshjha | 2016-07-06 12:37:48 +0530 |
commit | c9d07007e241508b3cdbb589bf074340afb05a38 (patch) | |
tree | f36add3c1d5f3d56553e862e89d37b227923ed58 /index.html | |
parent | bc299f262fb670ea107f3712f5dc33c6640099b1 (diff) | |
download | xcos-on-web-c9d07007e241508b3cdbb589bf074340afb05a38.tar.gz xcos-on-web-c9d07007e241508b3cdbb589bf074340afb05a38.tar.bz2 xcos-on-web-c9d07007e241508b3cdbb589bf074340afb05a38.zip |
Fixed source to target order for all port to port edges
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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); } |