Add print yoga node AllEdge value when debug mode #948

Closed
acton393 wants to merge 3 commits from master into main
5 changed files with 78 additions and 71 deletions
Showing only changes of commit 0d71ba17ac - Show all commits

View File

@@ -90,7 +90,11 @@ 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]); YGEdge edge = YGEdgeLeft;
if (edges[edge].isUndefined()) {
edge = YGEdgeAll;
}
appendNumberIfNotZero(base, key, edges[edge]);
} 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));