From 3f9f0f3ceb2f94930641556fc97c9319fc9c9cbd Mon Sep 17 00:00:00 2001 From: acton393 Date: Mon, 27 Feb 2023 08:20:29 -0800 Subject: [PATCH] Add print yoga node AllEdge value when debug mode (#948) 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 Pull Request resolved: https://github.com/facebook/yoga/pull/948 Reviewed By: cortinico Differential Revision: D43525328 Pulled By: NickGerleman fbshipit-source-id: 59dde363e6ee8433d10ecf27e440ea7d54000bc1 --- yoga/YGNodePrint.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yoga/YGNodePrint.cpp b/yoga/YGNodePrint.cpp index 6149cf53..f45011a7 100644 --- a/yoga/YGNodePrint.cpp +++ b/yoga/YGNodePrint.cpp @@ -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(edge));