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

Feature request: allow mutiple (selectable) styles for edges along the hierarchy tree #1897

Closed
1 of 3 tasks
finger563 opened this issue Jul 13, 2017 · 4 comments
Closed
1 of 3 tasks

Comments

@finger563
Copy link

I'm submitting a:


Feature requests

Description of new feature

Right now, when you have an edge from a parent (or a node higher up on the same branch of the hierarchy) to a child (or a node within that nodes subtree), the edge is always loop.

The same is true if the edge direction is reversed.

Example:

image

Instead, it would be nice to be able to specify which type of edge you want when creating that edge, so we could create both these types of edges:

uml_state_machine_fig8

Motivation for new feature

I use cytoscape for specifying and simulating state machines, and it would be nice to support both local and external transitions as their meaning is quite different and the rendering of them conveys the difference.

@maxkfranz
Copy link
Member

Item (b) already exists. You can alter loops with their style properties.

Item (a) is basically #1668, specifying an edge should be straight (like a single, bundled curve-style: bezier edge).

@finger563
Copy link
Author

Ah yes, I forgot to explicitly state that B does already exist ( it was actually the scenario I showed as the example from my deployment of cytoscape in the top image ).

Regarding A and the issue you referenced, so if that were the case, then for a child going to a parent the arrow would terminate on the inside edge of the parent state (as in the bottom image of A)? If so, then yes, that is exactly what I'd like to have :)

@finger563
Copy link
Author

That being said, I do feel like the line routing for the edges in B could use some work, but I suppose that would be a separate issue?

@maxkfranz
Copy link
Member

Regarding A and the issue you referenced, so if that were the case, then for a child going to a parent the arrow would terminate on the inside edge of the parent state (as in the bottom image of A)? If so, then yes, that is exactly what I'd like to have :)

It would just change the edge type. You'd might have to set several other of the existing edge-positioning properties to let the renderer know how the intersections should be found.

That being said, I do feel like the line routing for the edges in B could use some work, but I suppose that would be a separate issue?

IIRC, the loops are already pretty customisable with several properties. If you'd like more, feel free to make a PR that alters the edges the way you're thinking. Bezier loops are hard to create for compounds without invalidating the control points. If you want to add new loop types (like the square ones in your image), feel free to make a PR to add the calculations and style properties. If you need help coming up with the requirements / spec for the style properties, let me know in a new issue and I can help you define them.

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