Closed marmat closed 12 years ago
I moved the methods for drawing rounded rectangles into a separate file. Now the CanvasRenderingContext2D prototype is extended by these methods and therefore the methods are available everywhere.
Furthermore I reverted the accidental changes which I've commented on above.
@mohamedmansour, how can I pull this into a branch other than master? (leaving it for now)
Awesome work @kaktus621 ! =)
I changed the looks of the notification badge a bit so that it looks like the original Google+ notification badge (i.e. rounded corners and a stroke around them, see images for comparison). Furthermore I made the badge being rendered as inactive whenever the count is a non-positive number (if this is not desired, make sure to set
newItem
to false when calling the method with acount
of zero, I didn't look where the method gets called).Please see the comments in my commit; maybe the method for drawing a rounded rectangle should be added to the Canvas context prototype somewhere else.