Open nandrew opened 7 years ago
I have a similar issue. Rendering with React, the first time the endpoints and connections all work as expected. On the reload connections and endpoints are not added to the DOM, despite all the appropriate methods seeming to fire without error and jsPlumb having access to all the correct elements.
I had the same problem and managed to fix it. All I did was set main div with 'app' id as PlumbJs container (method .setContainer()). After that, all worked perfectly fine.
@LucasPilarski Thanks a lot! It's work!!
In my case, I changed the container setting from jsPlumb.Defaults.Container = 'contnet_body' to jsPlumb.setContainer('contnet_body') After that, connections and endpoints was rendered perfectly.
I am using jsPlumb with Angular4.
I have a similar issue. Rendering with React, the first time the endpoints and connections all work as expected. On the reload connections and endpoints are not added to the DOM, despite all the appropriate methods seeming to fire without error and jsPlumb having access to all the correct elements.
I am also facing the same issue. Any fix?
@LucasPilarski Thanks a lot! It's work!!
In my case, I changed the container setting from jsPlumb.Defaults.Container = 'contnet_body' to jsPlumb.setContainer('contnet_body') After that, connections and endpoints was rendered perfectly.
I am using jsPlumb with Angular4.
This solved the issue but now the new issue is that the position of connections is disturbed. Any idea?
@LucasPilarski Thanks a lot! It's work!! In my case, I changed the container setting from jsPlumb.Defaults.Container = 'contnet_body' to jsPlumb.setContainer('contnet_body') After that, connections and endpoints was rendered perfectly. I am using jsPlumb with Angular4.
This solved the issue but now the new issue is that the position of connections is disturbed. Any idea?
I got the position also fixed by adding jsPlumb.setContainer('Idofcontainer') inside constructor of component. Before this, I added that line inside componentDidMount(). Thanks, @ChingHanChan 🥇
I am not sure if I am missing something or there is an issue with what I am trying to do.
However when I try to draw dynamic connections, it is working fine on the first load, the second load there are no connections displaying.
The code at the bottom is used to dynamically connect a bunch of divs that look similar to this:
This all works fine the first time I load up the divs and apply the code below, however if I go back and reload a different set of divs it looks like the divs all get the correct classes on them,
but the connections are not showing up and I am guessing it's because whatever triggers this to draw isn't firing:
My code that applys the endpoints and connections.