Skip to content

Commit d93fdae

Browse files
committed
fix(image): calculate height
1 parent cfd0924 commit d93fdae

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

internal/img/generate.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,12 @@ func maxX(l []keyboard.Key) float64 {
378378
func maxY(l []keyboard.Key) float64 {
379379
curr := 0.
380380
for _, v := range l {
381-
if v.Y > curr {
382-
curr = v.Y
381+
height := v.Y
382+
if v.H != nil {
383+
height += *v.H - 1
384+
}
385+
if height > curr {
386+
curr = height
383387
}
384388
}
385389
return curr

0 commit comments

Comments
 (0)