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

Clearing graph #563

Open
gdulus opened this issue Sep 3, 2015 · 1 comment
Open

Clearing graph #563

gdulus opened this issue Sep 3, 2015 · 1 comment

Comments

@gdulus
Copy link

gdulus commented Sep 3, 2015

Hey

I have an issue with clearing view port. I'm creating graph with:

alchemy.begin({"dataSource": {"nodes": [{"id": 1},{"id": 2}],"edges": [{"source": 1,"target": 2}]}})

then clearing out:

alchemy.remove.nodes(alchemy.get.nodes().all());

and then i try to redraw the same graph:

alchemy.begin({"dataSource": {"nodes": [{"id": 1},{"id": 2}],"edges": [{"source": 1,"target": 2}]}})

and at this moment exception is thrown:

Uncaught TypeError: Cannot read property '0' of undefined
    at Object.a.EdgeUtils.edgeStyle (http://cdn.graphalchemist.com/alchemy.min.js:12:7094)
    at SVGGElement.<anonymous> (http://cdn.graphalchemist.com/alchemy.min.js:12:2689)
    at http://cdn.graphalchemist.com/alchemy.min.js:6:28884
    at K (http://cdn.graphalchemist.com/alchemy.min.js:4:20968)
    at Array.oh.each (http://cdn.graphalchemist.com/alchemy.min.js:6:28859)
    at Object.c.styleLink (http://cdn.graphalchemist.com/alchemy.min.js:12:2442)
    at Object.d.createEdge (http://cdn.graphalchemist.com/alchemy.min.js:12:4093)
    at a.updateGraph (http://cdn.graphalchemist.com/alchemy.min.js:11:32052)
    at a.Create.a.nodes (http://cdn.graphalchemist.com/alchemy.min.js:11:3422)
    at a.startGraph (http://cdn.graphalchemist.com/alchemy.min.js:11:27055)
@solvith
Copy link

solvith commented Oct 28, 2015

i have the same issues too

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