Skip to content

Commit 321aba1

Browse files
Update Graphics.js
1 parent 9affc60 commit 321aba1

1 file changed

Lines changed: 18 additions & 8 deletions

File tree

src/gameobjects/graphics/Graphics.js

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -568,15 +568,20 @@ var Graphics = new Class({
568568
*/
569569
fillRoundedRect: function (x, y, width, height, radius)
570570
{
571-
if (typeof radius === 'number') {
571+
if (typeof radius === 'number')
572+
{
572573
radius = {tl: radius, tr: radius, br: radius, bl: radius};
573-
} else if (typeof radius === 'object') {
574+
}
575+
else if (typeof radius === 'object')
576+
{
574577
var defaultRadius = {tl: 0, tr: 0, br: 0, bl: 0};
575-
for (var side in defaultRadius) {
578+
for (var side in defaultRadius)
579+
{
576580
radius[side] = radius[side] || defaultRadius[side];
577581
}
578582
}
579-
else {
583+
else
584+
{
580585
radius = {tl: 20, tr: 20, br: 20, bl: 20};
581586
}
582587

@@ -615,15 +620,20 @@ var Graphics = new Class({
615620
*/
616621
strokeRoundedRect: function (x, y, width, height, radius)
617622
{
618-
if (typeof radius === 'number') {
623+
if (typeof radius === 'number')
624+
{
619625
radius = {tl: radius, tr: radius, br: radius, bl: radius};
620-
} else if (typeof radius === 'object') {
626+
}
627+
else if (typeof radius === 'object')
628+
{
621629
var defaultRadius = {tl: 0, tr: 0, br: 0, bl: 0};
622-
for (var side in defaultRadius) {
630+
for (var side in defaultRadius)
631+
{
623632
radius[side] = radius[side] || defaultRadius[side];
624633
}
625634
}
626-
else {
635+
else
636+
{
627637
radius = {tl: 20, tr: 20, br: 20, bl: 20};
628638
}
629639

0 commit comments

Comments
 (0)