Fabric: Support for Yoga's `overflow` property on iOS

Summary:
@public
Quite trivial.

Reviewed By: mdvacca

Differential Revision: D9146963

fbshipit-source-id: 3cdace99c172a3aea3c0af07ecb82488437d0311
This commit is contained in:
Valentin Shergin 2018-08-03 07:50:30 -07:00 committed by Facebook Github Bot
parent 50b80a9ef8
commit 96238e03b6
1 changed files with 5 additions and 0 deletions

View File

@ -125,6 +125,11 @@ using namespace facebook::react;
self.hitTestEdgeInsets = RCTUIEdgeInsetsFromEdgeInsets(newViewProps.hitSlop);
}
// `overflow`
if (oldViewProps.yogaStyle.overflow != newViewProps.yogaStyle.overflow) {
self.clipsToBounds = newViewProps.yogaStyle.overflow != YGOverflowVisible;
}
// `zIndex`
if (oldViewProps.zIndex != newViewProps.zIndex) {
self.layer.zPosition = (CGFloat)newViewProps.zIndex;