jquery.flowchart icon indicating copy to clipboard operation
jquery.flowchart copied to clipboard

Links broken

Open LPerezPS opened this issue 7 years ago • 7 comments

Hello.

I'm trying to reload data from server using "setData", operators, inputs and outputs work but the links look broken at first.

image

Then if i move some operator the links show correctly.

image

I'm using AngularJS, execute the method using ng-init, and retrive data from the server with http post.

Thanks in advance.

LPerezPS avatar Jan 28 '19 18:01 LPerezPS

Did you discovered how to solve this @LPerezPS? I'm facing the same problem, but I'm using jQuery instead of Angular.

ronaldoscotti avatar Apr 10 '19 14:04 ronaldoscotti

Just to help whoever is having this issue in the future:

I was able to solve this using the redrawLinksLayer built in method, after the flowchart initialization.

ronaldoscotti avatar Apr 11 '19 12:04 ronaldoscotti

Hi @ronaldoscotti

Sorry for dont replay early but im a little busy, no i cant find a solution to this moment and i try the built method but still show the links broken, what version of jquery are using? and how you implement the method?; im using this way:

"Init" var $flowchart = $("#id_design"); $flowchart.flowchart("redrawLinksLayer");

Load $flowchart.flowchart("setData", data); $flowchart.flowchart("redrawLinksLayer");

LPerezPS avatar Apr 11 '19 16:04 LPerezPS

I'm using with jQuery v1.12.4, in a Wordpress instalation. I've tried to use the redrawLinksLayer directly after the flowchart declaration, but with no success, just like you.

But, my flowchart is placed inside a Bootstrap modal, so I placed the redrawLinksLayer in the open modal event, like this:

$('#modal-id').on('shown.bs.modal', function () { $flowchart.flowchart('redrawLinksLayer'); });

This way, every time I open the modal containing the flowchart, the links are drawed again.

ronaldoscotti avatar Apr 11 '19 17:04 ronaldoscotti

Yeah, im gonna think is the version cuz im using 3.3.1 and the plugins was update 2 years age soo if the redrawLinksLayer work for you that is nice :D

LPerezPS avatar Apr 11 '19 19:04 LPerezPS

Well, I'm facing the same problem and the

$flowchart.flowchart("setData", data);
$flowchart.flowchart("redrawLinksLayer");

does't work for me. :(

huaiwen avatar Apr 22 '19 04:04 huaiwen

Try

setTimeout( function() {
$flowchart.flowchart( "redrawLinksLayer" );
});

sandeep-kr-kgp avatar Apr 02 '21 08:04 sandeep-kr-kgp