Add print yoga node AllEdge value when debug mode #948

Closed
acton393 wants to merge 3 commits from master into main

View File

@@ -90,7 +90,8 @@ static void appendEdges(
const string& key, const string& key,
NickGerleman commented 2022-12-29 10:20:20 -08:00 (Migrated from github.com)
Review

This could also be the combination of YGEdgeVertical or YGEdgeHorizontal. I think the robust way to do this would be to call one of the node edge resolution functions (computeEdgeValueForColumn() or computeEdgeValueForRow())

This could also be the combination of YGEdgeVertical or YGEdgeHorizontal. I think the robust way to do this would be to call one of the node edge resolution functions (`computeEdgeValueForColumn()` or `computeEdgeValueForRow()`)
const YGStyle::Edges& edges) { const YGStyle::Edges& edges) {
if (areFourValuesEqual(edges)) { if (areFourValuesEqual(edges)) {
appendNumberIfNotZero(base, key, edges[YGEdgeLeft]); auto edgeValue = YGNode::computeEdgeValueForColumn(edges, YGEdgeLeft, detail::CompactValue::ofZero());
appendNumberIfNotZero(base, key, edgeValue);
} else { } else {
for (int edge = YGEdgeLeft; edge != YGEdgeAll; ++edge) { for (int edge = YGEdgeLeft; edge != YGEdgeAll; ++edge) {
string str = key + "-" + YGEdgeToString(static_cast<YGEdge>(edge)); string str = key + "-" + YGEdgeToString(static_cast<YGEdge>(edge));