@@ -14,7 +14,7 @@ public struct ImageViewer: View {
14
14
@State var dragOffset : CGSize = CGSize . zero
15
15
@State var dragOffsetPredicted : CGSize = CGSize . zero
16
16
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 ) {
18
18
self . image = image
19
19
self . imageOpt = nil
20
20
@@ -24,7 +24,7 @@ public struct ImageViewer: View {
24
24
self . closeButtonAlignment = closeButtonAlignment
25
25
}
26
26
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 ) {
28
28
self . image = Image ( systemName: " " )
29
29
self . imageOpt = image
30
30
@@ -150,7 +150,6 @@ public struct ImageViewer: View {
150
150
151
151
152
152
public class PinchZoomView : UIView {
153
-
154
153
weak var delegate : PinchZoomViewDelgate ?
155
154
156
155
private( set) var scale : CGFloat = 0 {
@@ -239,7 +238,6 @@ public protocol PinchZoomViewDelgate: AnyObject {
239
238
}
240
239
241
240
struct PinchZoom : UIViewRepresentable {
242
-
243
241
@Binding var scale : CGFloat
244
242
@Binding var anchor : UnitPoint
245
243
@Binding var offset : CGSize
0 commit comments