Skip to content

Commit

Permalink
Add print yoga node AllEdge value when debug mode (#948)
Browse files Browse the repository at this point in the history
Summary:
add print yoga node AllEdge value when debug mode, the old logic just print four edgeValue including top left bottom and right

but when we set the same value to these edge, we use YGAllEdge, this will be more convenient debug code

so I open this pull request to add it

X-link: facebook/yoga#948

Reviewed By: cortinico

Differential Revision: D43525328

Pulled By: NickGerleman

fbshipit-source-id: 59dde363e6ee8433d10ecf27e440ea7d54000bc1
  • Loading branch information
acton393 authored and facebook-github-bot committed Feb 27, 2023
1 parent 59157b8 commit 446a412
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ReactCommon/yoga/yoga/YGNodePrint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ static void appendEdges(
const string& key,
const YGStyle::Edges& edges) {
if (areFourValuesEqual(edges)) {
appendNumberIfNotZero(base, key, edges[YGEdgeLeft]);
auto edgeValue = YGNode::computeEdgeValueForColumn(
edges, YGEdgeLeft, detail::CompactValue::ofZero());
appendNumberIfNotZero(base, key, edgeValue);
} else {
for (int edge = YGEdgeLeft; edge != YGEdgeAll; ++edge) {
string str = key + "-" + YGEdgeToString(static_cast<YGEdge>(edge));
Expand Down

0 comments on commit 446a412

Please sign in to comment.