From 0d71ba17acbb315f7dc40c6887d3a079a338e7ed Mon Sep 17 00:00:00 2001 From: acton393 Date: Sun, 10 Nov 2019 23:43:35 +0800 Subject: [PATCH] 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 --- yoga/YGNodePrint.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yoga/YGNodePrint.cpp b/yoga/YGNodePrint.cpp index 6149cf53..57dbabd4 100644 --- a/yoga/YGNodePrint.cpp +++ b/yoga/YGNodePrint.cpp @@ -90,7 +90,11 @@ static void appendEdges( const string& key, const YGStyle::Edges& edges) { if (areFourValuesEqual(edges)) { - appendNumberIfNotZero(base, key, edges[YGEdgeLeft]); + YGEdge edge = YGEdgeLeft; + if (edges[edge].isUndefined()) { + edge = YGEdgeAll; + } + appendNumberIfNotZero(base, key, edges[edge]); } else { for (int edge = YGEdgeLeft; edge != YGEdgeAll; ++edge) { string str = key + "-" + YGEdgeToString(static_cast(edge));