Jump to content

[babylonjs gui] feature suggestion - different border radius for different corners


tomer
 Share

Recommended Posts

Hello,

What do you guys think about adding the option for setting a different border-radius (corner radius) for each corner?

Furthermore, I think that it might be better to try and follow as much as possible the CSS specification, for example - instead of calling the 'cornerRadius" property it should have been called "borderRadius", obviously I don't think you can implement all the CSS specification, I just think that when we do implement a feature the API should be based upon CSS.

 

Link to comment
Share on other sites

Unfortunately we cannot rename public properties.

For your feature request, we plan to support nine patch image so perhaps that could be enough to serve your needs?

Link to comment
Share on other sites

Hey,

nine patch images are great but won't do the trick for me, I need some sort of control over the border-radius, sometimes I need it on the left sometimes I need it on the right and sometimes I don't need it at all.

About renaming public properties I don't think you should change the name right now, but if you think that following the CSS spec is a good idea there are a few things you can do:

- rename cornerRadius to borderRadius, and add cornerRadius as an alias for borderRadius.

- mark "cornerRadius" as deprecated for the upcoming releases and when enough time has passed delete it.

- enforce that new features will be based upon CSS spec.

I also think that you should follow "semver" it can be useful when you want to break the API. (and maybe create a deprecation manifest, for example, we promise that the API won't break for at least 3 versions, so if something like this happens you can mark it as deprecated and remove it "safely" after 3 versions)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...