Skip to content

Commit

Permalink
Exposing setDirtiedFunc as plain C function YGNodeSetDirtiedFunc
Browse files Browse the repository at this point in the history
Summary: Trivial. Those lines were lost during rebasing of the original commit.

Reviewed By: priteshrnandgaonkar

Differential Revision: D6717696

fbshipit-source-id: a5dce25427c8977352b3ae7ea01e546a540e0c13
  • Loading branch information
shergin authored and facebook-github-bot committed Jan 16, 2018
1 parent ce3146a commit 6bb8617
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
12 changes: 12 additions & 0 deletions RNTester/js/TextExample.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,20 @@ exports.examples = [
render: function() {
return (
<Text>
The text
<View style={{borderColor: 'red', borderWidth: 1}}>
<Text style={{borderColor: 'blue', borderWidth: 1}}>Text Inside</Text>
<Text style={{borderColor: 'green', borderWidth: 1}}>Another text Inside</Text>
<Text style={{borderColor: 'yellow', borderWidth: 1}}>
Total inseption
<View style={{borderColor: 'red', borderWidth: 1}}>
<Text style={{borderColor: 'blue', borderWidth: 1}}>Insepted Text Inside</Text>
</View>
</Text>
</View>
The text should wrap if it goes on multiple lines. See, this is going
to the next line.
The text after.
</Text>
);
},
Expand Down
8 changes: 8 additions & 0 deletions ReactCommon/yoga/yoga/Yoga.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ void YGNodeSetBaselineFunc(YGNodeRef node, YGBaselineFunc baselineFunc) {
node->setBaseLineFunc(baselineFunc);
}

YGDirtiedFunc YGNodeGetDirtiedFunc(YGNodeRef node) {
return node->getDirtied();
}

void YGNodeSetDirtiedFunc(YGNodeRef node, YGDirtiedFunc dirtiedFunc) {
node->setDirtiedFunc(dirtiedFunc);
}

YGPrintFunc YGNodeGetPrintFunc(YGNodeRef node) {
return node->getPrintFunc();
}
Expand Down
2 changes: 2 additions & 0 deletions ReactCommon/yoga/yoga/Yoga.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ YGMeasureFunc YGNodeGetMeasureFunc(YGNodeRef node);
void YGNodeSetMeasureFunc(YGNodeRef node, YGMeasureFunc measureFunc);
YGBaselineFunc YGNodeGetBaselineFunc(YGNodeRef node);
void YGNodeSetBaselineFunc(YGNodeRef node, YGBaselineFunc baselineFunc);
YGDirtiedFunc YGNodeGetDirtiedFunc(YGNodeRef node);
void YGNodeSetDirtiedFunc(YGNodeRef node, YGDirtiedFunc dirtiedFunc);
YGPrintFunc YGNodeGetPrintFunc(YGNodeRef node);
void YGNodeSetPrintFunc(YGNodeRef node, YGPrintFunc printFunc);
bool YGNodeGetHasNewLayout(YGNodeRef node);
Expand Down

0 comments on commit 6bb8617

Please sign in to comment.