Data: review r1 fixes

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 12:45:45 -04:00
1 parent a27727bc71
commit 7401fc9bf2
38 files changed
+602 -148

No files matched your search

+4 -1
View File
@@ -58,10 +58,13 @@ func Carousel(c *ui.Context, index *int, n int, opts CarouselOptions, slide func
}
wrap := opts.Loop || opts.Autoplay
goTo := func(i int) {
if n == 0 {
return
}
if wrap {
i = (i%n + n) % n
}
if n == 0 || i < 0 || i >= n || i == *index {
if i < 0 || i >= n || i == *index {
return
}
*index = i