Commit fd141c8
committed
fix(columns): getColumnGeometry honors count when widths is absent (SD-2629)
The balancing migration (bd2ccf1) builds its geometry input directly from
columnCount/columnGap/columnWidth and only attaches a widths array in
explicit mode. In equal mode it passed {count, gap, width} with no widths,
and getColumnGeometry fell back to a single [width] column - so every column
index past 0 clamped onto column 0 and balanced content stacked on the left
margin (col2 x 432 -> 96 on the last page of equal-width multi-column docs).
A geometry must have exactly count columns. Expand the scalar width to count
equal columns when no widths array is present rather than collapsing to one.
normalizeColumnLayout already emits one width per column, so the normal
engine path is unchanged; this only hardens the hand-built case. The layout
corpus caught it (9 equal-width multi-column docs regressed; all restored).1 parent 8f2cdac commit fd141c8
2 files changed
Lines changed: 21 additions & 1 deletion
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
206 | 218 | | |
207 | 219 | | |
208 | 220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
185 | 191 | | |
186 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
187 | 195 | | |
188 | 196 | | |
189 | 197 | | |
| |||
0 commit comments