Skip to content

Commit

Permalink
Fixed Zoom Error
Browse files Browse the repository at this point in the history
Fixed Zoom Error
  • Loading branch information
Appracatappra committed Nov 9, 2023
1 parent 812de3c commit 87995fa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Sources/SwiftUIKit/Components/ZoomView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public struct ZoomView<Content: View>: View {
/// The size of the zoom control buttons
public var buttonSize:CGFloat = 24

/// Handles the zoom level being changed by the user
/// Handles the zoom level being changed by the user.
public var zoomChangedHandler:ZoomChangeHandler? = nil

/// The contents to scroll and zoom.
Expand All @@ -53,10 +53,13 @@ public struct ZoomView<Content: View>: View {
/// - showZoomControls: If `true`, show the zoom controls over the content.
/// - buttonSize: The size of the zoom control buttons
/// - content: The contents to scroll and zoom.
public init(minimumZoom: Double = 0.1, maximumZoom: Double = 2.0, zoomStep: Double = 0.10, showZoomControls: Bool = true, buttonSize: CGFloat = 24, zoomChangedHandler:ZoomChangeHandler? = nil, @ViewBuilder content: @escaping () -> Content) {
/// - initialZoom: The initial zoom level.
/// - zoomChangedHandler: Handles the zoom level being changed by the user.
public init(minimumZoom: Double = 0.1, maximumZoom: Double = 2.0, zoomStep: Double = 0.10, initialZoom: Double = 0.10, showZoomControls: Bool = true, buttonSize: CGFloat = 24, zoomChangedHandler:ZoomChangeHandler? = nil, @ViewBuilder content: @escaping () -> Content) {
self.minimumZoom = minimumZoom
self.maximumZoom = maximumZoom
self.zoomStep = zoomStep
self.initialZoom = initialZoom
self.showZoomControls = showZoomControls
self.buttonSize = buttonSize
self.zoomChangedHandler = zoomChangedHandler
Expand Down

0 comments on commit 87995fa

Please sign in to comment.