carousel: fix image positioning

This commit is contained in:
William Casarin
2023-05-30 17:57:32 -07:00
parent bb091d072f
commit 9e359650bf

View File

@@ -174,6 +174,7 @@ struct ImageCarousel: View {
Placeholder(url: url, geo_size: geo.size, num_urls: urls.count)
}
.aspectRatio(contentMode: filling ? .fill : .fit)
.position(x: geo.size.width / 2, y: geo.size.height / 2)
.tabItem {
Text(url.absoluteString)
}