mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-24 03:39:56 -04:00
fix layouts not working properly on nodes whose scale isn't 1
This commit is contained in:
parent
b1df152231
commit
a5f3fe10c7
1 changed files with 2 additions and 3 deletions
|
@ -304,7 +304,7 @@ AxisLayout::Row* AxisLayout::fitInRow(
|
|||
float crossLength;
|
||||
auto res = CCArray::create();
|
||||
|
||||
auto available = nodeAxis(on, m_axis, 1.f);
|
||||
auto available = nodeAxis(on, m_axis, 1.f / on->getScale());
|
||||
|
||||
auto fit = [&](CCArray* nodes) {
|
||||
nextAxisScalableLength = 0.f;
|
||||
|
@ -529,8 +529,7 @@ void AxisLayout::tryFitLayout(
|
|||
return;
|
||||
}
|
||||
|
||||
auto available = nodeAxis(on, m_axis, 1.f);
|
||||
|
||||
auto available = nodeAxis(on, m_axis, 1.f / on->getScale());
|
||||
if (available.axisLength <= 0.f) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue