Skip to content

Commit 6bb8617

Browse files
sherginfacebook-github-bot
authored andcommitted
Exposing setDirtiedFunc as plain C function YGNodeSetDirtiedFunc
Summary: Trivial. Those lines were lost during rebasing of the original commit. Reviewed By: priteshrnandgaonkar Differential Revision: D6717696 fbshipit-source-id: a5dce25427c8977352b3ae7ea01e546a540e0c13
1 parent ce3146a commit 6bb8617

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

RNTester/js/TextExample.ios.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,20 @@ exports.examples = [
233233
render: function() {
234234
return (
235235
<Text>
236+
The text
237+
<View style={{borderColor: 'red', borderWidth: 1}}>
238+
<Text style={{borderColor: 'blue', borderWidth: 1}}>Text Inside</Text>
239+
<Text style={{borderColor: 'green', borderWidth: 1}}>Another text Inside</Text>
240+
<Text style={{borderColor: 'yellow', borderWidth: 1}}>
241+
Total inseption
242+
<View style={{borderColor: 'red', borderWidth: 1}}>
243+
<Text style={{borderColor: 'blue', borderWidth: 1}}>Insepted Text Inside</Text>
244+
</View>
245+
</Text>
246+
</View>
236247
The text should wrap if it goes on multiple lines. See, this is going
237248
to the next line.
249+
The text after.
238250
</Text>
239251
);
240252
},

ReactCommon/yoga/yoga/Yoga.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,14 @@ void YGNodeSetBaselineFunc(YGNodeRef node, YGBaselineFunc baselineFunc) {
175175
node->setBaseLineFunc(baselineFunc);
176176
}
177177

178+
YGDirtiedFunc YGNodeGetDirtiedFunc(YGNodeRef node) {
179+
return node->getDirtied();
180+
}
181+
182+
void YGNodeSetDirtiedFunc(YGNodeRef node, YGDirtiedFunc dirtiedFunc) {
183+
node->setDirtiedFunc(dirtiedFunc);
184+
}
185+
178186
YGPrintFunc YGNodeGetPrintFunc(YGNodeRef node) {
179187
return node->getPrintFunc();
180188
}

ReactCommon/yoga/yoga/Yoga.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ YGMeasureFunc YGNodeGetMeasureFunc(YGNodeRef node);
166166
void YGNodeSetMeasureFunc(YGNodeRef node, YGMeasureFunc measureFunc);
167167
YGBaselineFunc YGNodeGetBaselineFunc(YGNodeRef node);
168168
void YGNodeSetBaselineFunc(YGNodeRef node, YGBaselineFunc baselineFunc);
169+
YGDirtiedFunc YGNodeGetDirtiedFunc(YGNodeRef node);
170+
void YGNodeSetDirtiedFunc(YGNodeRef node, YGDirtiedFunc dirtiedFunc);
169171
YGPrintFunc YGNodeGetPrintFunc(YGNodeRef node);
170172
void YGNodeSetPrintFunc(YGNodeRef node, YGPrintFunc printFunc);
171173
bool YGNodeGetHasNewLayout(YGNodeRef node);

0 commit comments

Comments
 (0)