-
Notifications
You must be signed in to change notification settings - Fork 64
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
Make dedicated pill shape function #1069
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I anticipate doing the same job for circle and homePlate shapes.
How come? Because they have different prettyShapeName
s?
I think it's generally useful and more readable in the ShieldJSON to have the shield definition be able to specify common shapes by name, particularly when they can consume defaults (in this case, corner radii). I confess that I don't fully understand @1ec5's vision for shield definition re-usability, but I see value in a slightly richer dictionary of shield shapes being more extendable down the line. |
This PR adds "pill" as a first-class shape that a shield style can specify. Behind the scenes in the shield library, it still just invoking roundedRectangle, but this allows the shield style definition to not have to do the hack of specifying a pill by declaring a rounded rectangle with a large radius. This removes the hack mentioned in #1062 for taginfo and saves a few bytes of ShieldJSON.
I anticipate doing the same job for circle and homePlate shapes.