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

Rounded Rectangle #3364

Merged
merged 3 commits into from
Aug 1, 2023
Merged

Conversation

AbdelbakiBoukerche
Copy link
Contributor

Added the ability to add border radius for rectangular shapes which result in a more appealing rounded rectangle.
Style Editor:
image
New shapes:
image

@grossmj
Copy link
Member

grossmj commented Aug 5, 2022

Thank you, we will review your PR soon 👍

@cristian-ciobanu
Copy link

Thank you, we will review your PR soon 👍

I think this rounded rectangle feature is a nice to have when drawing a topology.
@grossmj is this going to be merged ?

@grossmj
Copy link
Member

grossmj commented May 19, 2023

@cristian-ciobanu yes I think we should merge it. One blocker is we should support it on the web-ui too.

@grossmj
Copy link
Member

grossmj commented Jul 31, 2023

According to https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/rx there is also the possibility to have 2 new settings instead of border_radius: rx (radius on x-axis) and ry (radius on y-axis). Essentially, a border radius of 30 is rx=30 and ry=30 however allowing users to pick the values for these settings would bring more shape options (see the examples on the linked page).

What do you think, should we only have border radius or rx/ry?

@grossmj
Copy link
Member

grossmj commented Aug 1, 2023

Thanks again for your PR. I made some changes so the SVG rectangle has valid attributes (rx and ry). This makes it easier for supporting rounded rectangles in our web-ui as well.

For now we only support corner radius as a setting for rectangles where its value is used to set both rx and ry in the SVG. In the future we could consider allowing to have "horizontal corner radius" and "vertical corner radius" settings instead.

@grossmj grossmj merged commit aa9b9d3 into GNS3:master Aug 1, 2023
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants