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

add_edge properties are attached to the list of edges instead of the edge's link visualizer #69

Open
acbart opened this issue Apr 9, 2020 · 4 comments

Comments

@acbart
Copy link
Contributor

acbart commented Apr 9, 2020

The following code is meant to create an Edge with the label "Gamma", but does not do so.

graph = GraphAdjList()
graph.add_vertex("A", label='Alpha')
graph.add_vertex("B", label='Beta')
graph.add_edge('A', 'B', label='Gamma')

However, the following addition will update the label successfully:

graph.get_edge('A', 'B').label = 'Delta'

It seems to be a result of the following code:

self.adj_list[source_id] = SLelement(e=Edge(source_id, dest_id, data), next=self.adj_list.get(src), label=label,

I'm pretty sure these arguments should be passed to the Edge constructor instead of to the SLElement.

@krs-world
Copy link
Contributor

krs-world commented Apr 9, 2020 via email

@AlecGoncharow
Copy link
Contributor

Should work as intended now

@krs-world
Copy link
Contributor

krs-world commented Apr 10, 2020 via email

@AlecGoncharow
Copy link
Contributor

This isn't an issue in the other languages, as the other clients don't provide the ability to add visual properties in the addEdge method arguments.

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

3 participants