Skip to content

Added circle-triangle edge arrow type #2663

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

Merged
merged 8 commits into from
Apr 20, 2020

Conversation

kaino
Copy link
Contributor

@kaino kaino commented Apr 13, 2020

Issue type
Feature request

Description of new feature
Edge arrows as the combination of a triangle and a circle.

Motivation for new feature

In the last two years I've been using with great satisfaction cytoscape.js to manipulate graphs.
The original technology that I replaced with cytoscape, used the triangle + circle arrow style to represent the "owner" of a connection.
Since in my context such arrow style is part of a standard, I must keep it the same to avoid disruption or misunderstandings, so I would really like to have it as part of the cytoscape.js project.

Tests are passing, documentation + edges demo are updated accordingly.
Please let me know if anything is not clear, or in case of an issues with this pull request.

Thank you very much
Best Regards,
Paolo

@maxkfranz maxkfranz self-requested a review April 14, 2020 16:14
@maxkfranz
Copy link
Member

The PR looks great. My only suggestion would be to call the arrow type circle-triangle.

Other arrows that have multiple components, like triangle-tee, list the components starting from the end of the line and going inwards. For triangle-tee, the triangle is at the end of the line and the tee is inward:

Screen Shot 2020-04-17 at 1 23 14 PM

For your shape, the circle is at the end of the line and the triangle is inward:

Screen Shot 2020-04-17 at 1 19 11 PM

So circle-triangle may be a better fit.

If we support a new shape in future that has the triangle at the end and the circle going inwards, then the distinction between triangle-circle and circle-triangle will be important.

@kaino
Copy link
Contributor Author

kaino commented Apr 18, 2020

Hi @maxkfranz ,
thanks for reviewing this.
Actually, an open point for me was just the choice between 'triangle-circle' and 'circle-triangle'.
I've made the suggested changes on the PR, and tested it locally, everything should be fine.
Please let me know for any issues about the new commits.

Thanks again
Best Regards,
Paolo

@kaino kaino changed the title Added triangle-circle edge arrow type Added circle-triangle edge arrow type Apr 20, 2020
@maxkfranz maxkfranz added this to the 3.15.0 milestone Apr 20, 2020
@maxkfranz maxkfranz merged commit c16f643 into cytoscape:unstable Apr 20, 2020
@maxkfranz
Copy link
Member

Great. The PR is merged in and the feature will be available in the 3.15.0 release at the beginning of May.

Thanks for the PR

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

Successfully merging this pull request may close these issues.

2 participants