From a4035ffd692b7e5f4c1dfabb8693dda8dc6b2178 Mon Sep 17 00:00:00 2001 From: Zhen Tang Date: Mon, 10 Jun 2013 12:57:00 +0800 Subject: [PATCH] Smal bug fix. --- src/main/webapp/script/haflow.main.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/main/webapp/script/haflow.main.js b/src/main/webapp/script/haflow.main.js index 4266f4a..4f89f33 100644 --- a/src/main/webapp/script/haflow.main.js +++ b/src/main/webapp/script/haflow.main.js @@ -610,15 +610,7 @@ HAFlow.Main.prototype.bindJsPlumbEvents = function(flowId) { this.jsPlumb[flowId].bind("connection", function(info) { _currentInstance.onConnectionCreated(_currentInstance, flowId, info); }); - this.jsPlumb[flowId].bind("connectionDrag", function(connection) { - console.log("connection " + connection.id - + " is being dragged. suspendedElement is ", - connection.suspendedElement, " of type ", - connection.suspendedElementType); - }); - this.jsPlumb[flowId].bind("connectionDragStop", function(connection) { - console.log("connection " + connection.id + " was dragged"); - }); + }; HAFlow.Main.prototype.onConnectionCreated = function(instance, flowId, info) { @@ -655,13 +647,16 @@ HAFlow.Main.prototype.onConnectionCreated = function(instance, flowId, info) { HAFlow.Main.prototype.onConnectionClicked = function(instance, flowId, info) { var source = info.sourceId.replace("node_", ""); + var sourceEndpoint = info.endpoints[0].overlays[0].getLabel(); var target = info.targetId.replace("node_", ""); + var targetEndpoint = info.endpoints[1].overlays[0].getLabel(); var sourceNode = instance.getNodeById(instance, flowId, source); var targetNode = instance.getNodeById(instance, flowId, target); var text = ""; - text += "
From: " + sourceNode.name + ".To: " - + targetNode.name + ".
"; + text += "
From: " + sourceNode.name + "." + sourceEndpoint + + "To: " + targetNode.name + "." + targetEndpoint + + "
"; text += "
Delete?
"; text += "
"; $("#" + instance.informationContainerId).html(text);