This commit is contained in:
altalk23 2024-12-01 20:16:59 +03:00
parent 1b9a10776d
commit b8d29a8aa2

View file

@ -775,7 +775,6 @@ void AxisLayout::apply(CCNode* on) {
} }
if (first) { if (first) {
minMaxPrio = { prio, prio }; minMaxPrio = { prio, prio };
first = false;
} }
else { else {
if (prio < minMaxPrio.first) { if (prio < minMaxPrio.first) {
@ -786,9 +785,13 @@ void AxisLayout::apply(CCNode* on) {
} }
} }
if (m_impl->m_autoGrowAxisMinLength.has_value()) { if (m_impl->m_autoGrowAxisMinLength.has_value()) {
totalLength += nodeAxis(node, m_impl->m_axis, 1.f).axisLength + m_impl->nextGap(prev, opts); totalLength += nodeAxis(node, m_impl->m_axis, 1.f).axisLength;
if (!first) {
totalLength += m_impl->nextGap(prev, opts);
}
prev = opts; prev = opts;
} }
first = false;
} }
if (m_impl->m_autoGrowAxisMinLength.has_value()) { if (m_impl->m_autoGrowAxisMinLength.has_value()) {