From 6bb8617f3a2f3f80f89eb00595a621aec35aca83 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Mon, 15 Jan 2018 15:35:51 -0800 Subject: [PATCH] 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 --- RNTester/js/TextExample.ios.js | 12 ++++++++++++ ReactCommon/yoga/yoga/Yoga.cpp | 8 ++++++++ ReactCommon/yoga/yoga/Yoga.h | 2 ++ 3 files changed, 22 insertions(+) diff --git a/RNTester/js/TextExample.ios.js b/RNTester/js/TextExample.ios.js index 1980ced73..b4e2a8482 100644 --- a/RNTester/js/TextExample.ios.js +++ b/RNTester/js/TextExample.ios.js @@ -233,8 +233,20 @@ exports.examples = [ render: function() { return ( + The text + + Text Inside + Another text Inside + + Total inseption + + Insepted Text Inside + + + The text should wrap if it goes on multiple lines. See, this is going to the next line. + The text after. ); }, diff --git a/ReactCommon/yoga/yoga/Yoga.cpp b/ReactCommon/yoga/yoga/Yoga.cpp index b4f30dd0f..f357eeaf2 100644 --- a/ReactCommon/yoga/yoga/Yoga.cpp +++ b/ReactCommon/yoga/yoga/Yoga.cpp @@ -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(); } diff --git a/ReactCommon/yoga/yoga/Yoga.h b/ReactCommon/yoga/yoga/Yoga.h index 28326019f..df16fce4c 100644 --- a/ReactCommon/yoga/yoga/Yoga.h +++ b/ReactCommon/yoga/yoga/Yoga.h @@ -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);