Closed GoogleCodeExporter closed 8 years ago
Hi,
are you asking whether or not the label is provided in the event callback?
Original comment by simon.po...@gmail.com
on 13 Jan 2012 at 8:34
Thanks for you reply:
I mean
1. i want to detach the connection by the label event on this connection
2. i want to change the "Label" title on label event
is it possible to do the two in the Connection--> overlays -->
"Label"-->Events-->"Click"
Original comment by chaoy...@gmail.com
on 14 Jan 2012 at 9:37
the label is passed back as the first argument in the event callback:
"click":function(label, originalEvent) {
var bool=confirm("delete?");
if(bool) {
//todo detach the connection
// jsPlumb.detach(label.connection); <-- 'connection' is a member of label.
}}
}
you can change the label's title with this method:
label.setLabel("new label");
Original comment by simon.po...@gmail.com
on 14 Jan 2012 at 11:12
Thank you very much!
Fixed!
Original comment by chaoy...@gmail.com
on 16 Jan 2012 at 1:07
you're welcome. closing this out.
Original comment by simon.po...@gmail.com
on 16 Jan 2012 at 1:58
I have exact same issue. I don't see connection as a member of label???
// jsPlumb.detach(label.connection); <-- 'connection' is a member of label.
Original comment by th71...@gmail.com
on 1 Nov 2013 at 2:10
it was changed to `component` a while ago.
Original comment by simon.po...@gmail.com
on 1 Nov 2013 at 8:00
Original issue reported on code.google.com by
chaoy...@gmail.com
on 13 Jan 2012 at 9:55