Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27793] Add ability to control borderRadius for each corner independently

GitHub Issuen/a
TypeNew Feature
PriorityNone
StatusClosed
ResolutionDuplicate
Resolution Date2020-03-06T20:00:31.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterBrenton House
AssigneeUnknown
Created2020-03-06T16:32:11.000+0000
Updated2020-03-06T20:34:50.000+0000

Description

Add ability to control borderRadius for each corner independently.

Comments

  1. Joshua Quick 2020-03-06

    This is a duplicate of [TIMOB-27305]
  2. Brenton House 2020-03-06

    [~jquick] - Looks like that ticket is for adding a new property. Maybe we can modify that ticket to incorporate this.
  3. Joshua Quick 2020-03-06

    That ticket has the same goal you are looking for. You can choose which corners the borderRadius should be applied to. So, it achieves the same effect. Hans already has a working PR for iOS. Unless you think it should be implemented in a different way where you can apply a different radius per corner. I'm open to the idea. (We should do one or the other; not both.)
  4. Joshua Quick 2020-03-06

    Perhaps the "borderRadius" property should accept 2 different types? It can type a numeric value like it does today, which is applied to all corners.
       view.borderRadius = 15;  // Applies 15 to all corners.
       
    Or you can set it to a dictionary where you can set each corner independently like the below.
       view.borderRadius = {
       	topLeft: 15,
       	topRight: 15,
       	bottomLeft: 0,  // Omitting this makes it zero too.
       	bottomRight: 0, // Omitting this makes it zero too.
       };
       

JSON Source