@@ -14,7 +14,7 @@ public struct ImageViewer: View {
1414 @State var dragOffset : CGSize = CGSize . zero
1515 @State var dragOffsetPredicted : CGSize = CGSize . zero
1616
17- public init ( image: Image , viewerShown: Binding < Bool > , aspectRatio: Binding < CGFloat > ? = nil , caption: Text ? = nil , closeButtonAlignment: CloseButtonAlignment ? ) {
17+ public init ( image: Image , viewerShown: Binding < Bool > , aspectRatio: Binding < CGFloat > ? = nil , caption: Text ? = nil , closeButtonAlignment: CloseButtonAlignment ? = . topLeft ) {
1818 self . image = image
1919 self . imageOpt = nil
2020
@@ -24,7 +24,7 @@ public struct ImageViewer: View {
2424 self . closeButtonAlignment = closeButtonAlignment
2525 }
2626
27- public init ( image: Image ? , viewerShown: Binding < Bool > , aspectRatio: Binding < CGFloat > ? = nil , caption: Text ? = nil , closeButtonAlignment: CloseButtonAlignment ? ) {
27+ public init ( image: Image ? , viewerShown: Binding < Bool > , aspectRatio: Binding < CGFloat > ? = nil , caption: Text ? = nil , closeButtonAlignment: CloseButtonAlignment ? = . topLeft ) {
2828 self . image = Image ( systemName: " " )
2929 self . imageOpt = image
3030
@@ -150,7 +150,6 @@ public struct ImageViewer: View {
150150
151151
152152public class PinchZoomView : UIView {
153-
154153 weak var delegate : PinchZoomViewDelgate ?
155154
156155 private( set) var scale : CGFloat = 0 {
@@ -239,7 +238,6 @@ public protocol PinchZoomViewDelgate: AnyObject {
239238}
240239
241240struct PinchZoom : UIViewRepresentable {
242-
243241 @Binding var scale : CGFloat
244242 @Binding var anchor : UnitPoint
245243 @Binding var offset : CGSize
0 commit comments