Disable Drag and Drop on jsPlumb Endpoints

2,856 views
Skip to first unread message

Roman Jaquez

unread,
Oct 22, 2012, 12:54:24 PM10/22/12
to jsp...@googlegroups.com
Has anybody been able to accomplish this? I have already existing connections made between some controls, and i have a button that should disable the dragging and dropping when clicked on it.
How do make it so that when you click on an endpoint nothing happens (no connection gets made)? Thanks in advance.

Roman Jaquez

unread,
Oct 22, 2012, 1:02:04 PM10/22/12
to jsp...@googlegroups.com
Just found my own answer. On my retrieved endpoint, i just have to say endpoint.setEnabled(false);
For example: 
var currentEndpoint = jsPlumb.addEndpoint("pbStageControl" + index, { anchor: ["RightMiddle", { shape: 'circle' }] }, stageEndpointOptions);
currentEndpoint.setEnabled(false);

Thanks anyway!
Reply all
Reply to author
Forward
0 new messages