Skip to content

Commit

Permalink
fix(image): calculate height
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMarble committed Jan 29, 2023
1 parent cfd0924 commit d93fdae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/img/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,12 @@ func maxX(l []keyboard.Key) float64 {
func maxY(l []keyboard.Key) float64 {
curr := 0.
for _, v := range l {
if v.Y > curr {
curr = v.Y
height := v.Y
if v.H != nil {
height += *v.H - 1
}
if height > curr {
curr = height
}
}
return curr
Expand Down

0 comments on commit d93fdae

Please sign in to comment.