Mac
unread,Feb 28, 2012, 5:50:09 AM2/28/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jsPlumb
Hi,
I'm using jsPlumb in my project and I would like to know from which
endpoint to which one is a connection made.
I'm trying to do this in the following way:
- setting a label to each connection and when is clicked it should
show the source ID and the target ID of that connection..
jsPlumb.Defaults.ConnectionOverlays = [
[ "Label",
{
label:"showIDs",
events:{
"click":function(c) {
alert(c.sourceId+" to "+c.targetId);
}
}
}]
];
but it doesn't work.. the result is an "undefined" value..
my endpoints are defined as:
var endpointOptions = { isSource:true,
endpoint:"Rectangle",
paintStyle:{ width:17, height:17, fillStyle:"#000" },
connectorOverlays:[[ "Arrow" ]],
isTarget:true };
jsPlumb.addEndpoint('someDiv',
endpointOptions);
How could I set that ID value to each EndPoint??
thanks in advance.