Fixed border bug on events dashboard

This commit is contained in:
Nick Lockwood 2015-06-23 06:43:55 -07:00
Родитель 9ed2bd6285
Коммит 1e66e5f53d
1 изменённых файлов: 10 добавлений и 5 удалений

Просмотреть файл

@ -494,12 +494,17 @@ RCT_NOT_IMPLEMENTED(-initWithCoder:unused)
!RCTRunningInTestEnvironment() &&
RCTCornerRadiiAreEqual(cornerRadii) &&
RCTBorderInsetsAreEqual(borderInsets) &&
RCTBorderColorsAreEqual(borderColors);
RCTBorderColorsAreEqual(borderColors) &&
// TODO: A problem with this is that iOS draws borders in front of the content
// whereas CSS draws them behind the content. Also iOS clips to the outside of
// the border, but CSS clips to the inside. To solve this, we'll need to add
// a container view inside the main view to correctly clip the subviews.
// iOS draws borders in front of the content whereas CSS draws them behind
// the content. For this reason, only use iOS border drawing when clipping
// or when the border is hidden.
(borderInsets.top == 0 || CGColorGetAlpha(borderColors.top) == 0 || self.clipsToBounds);
// iOS clips to the outside of the border, but CSS clips to the inside. To
// solve this, we'll need to add a container view inside the main view to
// correctly clip the subviews.
if (useIOSBorderRendering) {
layer.cornerRadius = cornerRadii.topLeft;