Skip to content

Commit

Permalink
calling markDirtyAndPropogate when setting isReferenceBaseline value
Browse files Browse the repository at this point in the history
Summary:
@public
Marking the node as dirty when isReferenceBaseline property is changed

Reviewed By: davidaurelio

Differential Revision: D13147742

fbshipit-source-id: 3bbff1cfceeadfbf77380519e4638f2984fc2009
  • Loading branch information
SidharthGuglani-zz authored and facebook-github-bot committed Nov 26, 2018
1 parent 1f8b46a commit f000cf0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ReactCommon/yoga/yoga/Yoga.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,10 @@ void YGConfigCopy(const YGConfigRef dest, const YGConfigRef src) {
}

void YGNodeSetIsReferenceBaseline(YGNodeRef node, bool isReferenceBaseline) {
node->setIsReferenceBaseline(isReferenceBaseline);
if (node->isReferenceBaseline() != isReferenceBaseline) {
node->setIsReferenceBaseline(isReferenceBaseline);
node->markDirtyAndPropogate();
}
}

bool YGNodeIsReferenceBaseline(YGNodeRef node) {
Expand Down

0 comments on commit f000cf0

Please sign in to comment.