v0.0.497
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 2m33s

This commit is contained in:
Mike Schwörer 2024-08-07 17:04:59 +02:00
parent 741611a2e1
commit 7204562879
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
2 changed files with 15 additions and 10 deletions

View File

@ -1,5 +1,5 @@
package goext
const GoextVersion = "0.0.496"
const GoextVersion = "0.0.497"
const GoextVersionTimestamp = "2024-08-07T15:34:06+0200"
const GoextVersionTimestamp = "2024-08-07T17:04:59+0200"

View File

@ -289,23 +289,28 @@ func (b *TableBuilder) calculateColumns() []float64 {
return columnWidths
}
for i, _ := range columnDef {
if frColumnWeights[i] != 0 {
w := min(autoWidths[i], (remainingWidth/float64(frColumnWidthCount))*frColumnWeights[i])
remainingWidth += columnWidths[i]
columnWidths[i] = w
remainingWidth -= w
{
rmSub := 0.0
for i := range columnDef {
if frColumnWeights[i] != 0 {
w := min(autoWidths[i], (remainingWidth/float64(frColumnWidthCount))*frColumnWeights[i])
rmSub += w - columnWidths[i]
columnWidths[i] = w
}
}
remainingWidth -= rmSub
}
if remainingWidth > 0 {
if remainingWidth > 0.01 {
rmSub := 0.0
for i, _ := range columnDef {
if frColumnWeights[i] != 0 {
addW := (remainingWidth / float64(frColumnWidthCount)) * frColumnWeights[i]
rmSub += addW
columnWidths[i] += addW
remainingWidth -= addW
}
}
remainingWidth -= rmSub
}
return columnWidths