Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links broken #103

Open
LPerezPS opened this issue Jan 28, 2019 · 7 comments
Open

Links broken #103

LPerezPS opened this issue Jan 28, 2019 · 7 comments

Comments

@LPerezPS
Copy link

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.

@ronaldoscotti
Copy link

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

@ronaldoscotti
Copy link

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.

@LPerezPS
Copy link
Author

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");

@ronaldoscotti
Copy link

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.

@LPerezPS
Copy link
Author

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

@huaiwen
Copy link

huaiwen commented Apr 22, 2019

Well, I'm facing the same problem and the

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

does't work for me.
:(

@sandeep-kr-kgp
Copy link

Try

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants