mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-05 16:37:08 +08:00
Reimagining of RCTShadowView layout API
Summary: This is reimagining of interoperability layer between Yoga and ShadowViews (at least in Yoga -> RN part). Goals: * Make it clear and easy. * Make clear separation between "what layout what", now parent always layout children, noone layout itself. * Make possible to interleave Yoga layout with custom imperative layout (may be used in SafeAreaView, Text, Modal, InputAccessoryView and so on). Reviewed By: mmmulani Differential Revision: D6863654 fbshipit-source-id: 5a6a933874f121d46f744aab99a31ae42ddd4a1b
This commit is contained in:
committed by
Facebook Github Bot
parent
47b36d3ff0
commit
f91f7d91a1
@@ -47,6 +47,11 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)layoutSubviewsWithContext:(RCTLayoutContext)layoutContext
|
||||
{
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
- (void)setLocalData:(NSObject *)localData
|
||||
{
|
||||
NSAttributedString *attributedText = (NSAttributedString *)localData;
|
||||
@@ -73,7 +78,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
CGSize maximumSize = self.frame.size;
|
||||
CGSize maximumSize = self.layoutMetrics.frame.size;
|
||||
|
||||
if (_maximumNumberOfLines == 1) {
|
||||
maximumSize.width = CGFLOAT_MAX;
|
||||
|
||||
Reference in New Issue
Block a user