mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Fabric/Text: RCTParagraphComponentView
Summary: RCTParagraphComponentView is a UIView which can render text using TextLayoutManager. Reviewed By: mdvacca Differential Revision: D7751853 fbshipit-source-id: e6ee9a0f989cdf6e878390d37dbcf8a11ef90bf4
This commit is contained in:
committed by
Facebook Github Bot
parent
9646c5cb3c
commit
81bdd36204
@@ -23,6 +23,13 @@ struct LayoutMetrics {
|
||||
DisplayType displayType {DisplayType::Flex};
|
||||
LayoutDirection layoutDirection {LayoutDirection::Undefined};
|
||||
|
||||
Rect getContentFrame() const {
|
||||
return Rect {
|
||||
Point {contentInsets.left, contentInsets.top},
|
||||
Size {frame.size.width - contentInsets.left - contentInsets.right, frame.size.height - contentInsets.top - contentInsets.bottom}
|
||||
};
|
||||
}
|
||||
|
||||
bool operator ==(const LayoutMetrics& rhs) const {
|
||||
return
|
||||
std::tie(this->frame, this->contentInsets, this->borderWidth, this->displayType, this->layoutDirection) ==
|
||||
|
||||
Reference in New Issue
Block a user