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

Layout not working after created #61

Open
gioppoluca opened this issue Jul 9, 2020 · 1 comment
Open

Layout not working after created #61

gioppoluca opened this issue Jul 9, 2020 · 1 comment

Comments

@gioppoluca
Copy link

I'm adding nodes in the "created" hook of VUE after an API call.
I execute the:

this.$refs.cyRef.instance.layout({
        name: 'breadthfirst',
        avoidOverlap: true, // prevents node overlap, may overflow boundingBox if not enough space
        directed: true,
      }).run();
this.$refs.cyRef.instance.resize();

right after the last node added but nothing happens
If I add a new node through a button and reapply the layout I get the layout applyed, but at the "created" the nodes are all piled up in the same spot.
How is possible to make cytoscape react to the population of nodes coming up from API at the start of a page?

@daddycocoaman
Copy link

Hi, could you try this proposed solution? #57 (comment)

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

2 participants