Skip to content

Commit 1485f02

Browse files
committed
Fix the sacle params, the default value is 1. 0 is automatically translate to 1
1 parent e478865 commit 1485f02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SDWebImageSwiftUI/Classes/AnimatedImage.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ public struct AnimatedImage : PlatformViewRepresentable {
119119
/// Create an animated image with data and scale.
120120
/// - Parameter data: The image data
121121
/// - Parameter scale: The scale factor
122-
public init(data: Data, scale: CGFloat = 0) {
122+
public init(data: Data, scale: CGFloat = 1) {
123123
self.init(data: data, scale: scale, isAnimating: .constant(true))
124124
}
125125

126126
/// Create an animated image with data and scale, including animation control binding.
127127
/// - Parameter data: The image data
128128
/// - Parameter scale: The scale factor
129129
/// - Parameter isAnimating: The binding for animation control
130-
public init(data: Data, scale: CGFloat = 0, isAnimating: Binding<Bool>) {
130+
public init(data: Data, scale: CGFloat = 1, isAnimating: Binding<Bool>) {
131131
self._isAnimating = isAnimating
132132
self.imageModel.data = data
133133
self.imageModel.scale = scale

0 commit comments

Comments
 (0)