Continuous anchor face restrictions do not work in jsPlumb 1.7.5

92 views Asked by At

I want to build graphs that have a general direction from top to bottom. That is why I want to restrict any connections to be painted coming from the bottom face of any source and going into the top face of any target, preferrably Continuous (as a matter of fact, trying to create Static or Dynamic anchors actually throws an error telling me that those types don't exist). It appears that the documentation is a bit out of date?

I followed the instructions and made sure to call the following code on all my graph nodes ($element):

plumbInstance.makeSource($element, {
    anchor:['Continuous', { faces:[ "bottom" ] } ]
});

plumbInstance.makeTarget($element, {
    anchor:['Continuous', { faces:[ "top" ] } ]
});

But it simply ignores these restrictions and still chooses the closest face, rather than only top and bottom faces.

NOTE: I am using jsPlumb version 1.7.5.

What am I doing wrong?

0

There are 0 answers