jsPlumb drop on target Element, not only Endpoint

289 views Asked by At

i search by Google but don't find anything.

I have some source div's and one target div. Now when a User want to create a connection he must click directly on the endpoint from the source and must drop the connection directly on the endpoint from the target. But I want that the drop is possible also on the target div, not only the endpoint. The traget and the source have only one endpoint.

Have someone an idea for this?

Thank you

1

There are 1 answers

0
Burner On BEST ANSWER

I found a solution by my own:

jsPlumbInstance._katavorio_main.droppable(iPos.id,{
        canDrop:function(iDragObj) {return canDropPos(iDragObj);},
        over:function(iObj) {dragOver(iObj);},
        drop:function(iObj) {dropPos(iObj);}
    });

and this is for a target div:

var endpointOptions = {
        isTarget:true,
        maxConnections:20,
        uniqueEndpoint:true
    };
jsPlumbInstance.makeTarget('id123', endpointOptions);