tomer Posted October 10, 2018 Share Posted October 10, 2018 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. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 10, 2018 Share Posted October 10, 2018 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? Quote Link to comment Share on other sites More sharing options...
tomer Posted October 10, 2018 Author Share Posted October 10, 2018 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) Quote Link to comment Share on other sites More sharing options...
Guest Posted October 10, 2018 Share Posted October 10, 2018 we promise to not break compat:) https://github.com/BabylonJS/Babylon.js/blob/master/contributing.md For the custom border radius, this is the function to update if you want to hack it a bit: https://github.com/BabylonJS/Babylon.js/blob/master/gui/src/2D/controls/rectangle.ts#L109 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.