mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-27 01:45:35 -05:00
fix positioning in single line
This commit is contained in:
parent
262c15dbb2
commit
da815aba72
1 changed files with 10 additions and 5 deletions
|
@ -397,11 +397,11 @@ bool AxisLayout::canTryScalingDown(
|
|||
if (prio > minMaxPrios.first) {
|
||||
while (true) {
|
||||
prio -= 1;
|
||||
auto scale = this->maxScaleForPrio(nodes, prio);
|
||||
if (!scale) {
|
||||
auto mscale = this->maxScaleForPrio(nodes, prio);
|
||||
if (!mscale) {
|
||||
continue;
|
||||
}
|
||||
crossScaleDownFactor = scale;
|
||||
scale = mscale;
|
||||
break;
|
||||
}
|
||||
attemptRescale = true;
|
||||
|
@ -493,7 +493,7 @@ void AxisLayout::tryFitLayout(
|
|||
return this->tryFitLayout(
|
||||
on, nodes,
|
||||
minMaxPrios, doAutoScale,
|
||||
crossScaleDownFactor, squish, prio
|
||||
scale, squish, prio
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -632,8 +632,13 @@ void AxisLayout::tryFitLayout(
|
|||
}
|
||||
else {
|
||||
if (ix) {
|
||||
if (row->prio == minMaxPrios.first) {
|
||||
rowAxisPos += this->nextGap(prev, opts) * row->scale * row->squish;
|
||||
}
|
||||
else {
|
||||
rowAxisPos += this->nextGap(prev, opts) * row->squish;
|
||||
}
|
||||
}
|
||||
axisPos = rowAxisPos + pos.axisLength * pos.axisAnchor;
|
||||
rowAxisPos += pos.axisLength -
|
||||
row->axisEndsLength * row->scale * (1.f - row->squish) * 1.f / nodes->count();
|
||||
|
|
Loading…
Reference in a new issue