Removed initialImageWidth, just did overwrite value from imageWidth

This commit is contained in:
dankito 2020-08-30 17:02:59 +02:00
parent d3386217b9
commit f75db3f827
1 changed files with 1 additions and 3 deletions

View File

@ -12,7 +12,7 @@ struct ScaleImageView: View {
private let step: CGFloat
init(_ imageWidth: Binding<CGFloat>, _ initialImageWidth: CGFloat? = nil) {
init(_ imageWidth: Binding<CGFloat>) {
let screenWidth = UIScreen.main.bounds.width
let screenWidthQuarter = screenWidth / 4
@ -22,8 +22,6 @@ struct ScaleImageView: View {
let range = imageMaxWidth - imageMinWidth
self.init(imageWidth, imageMinWidth: imageMinWidth, imageMaxWidth: imageMaxWidth, step: range / 20)
self.$imageWidth.wrappedValue = initialImageWidth ?? (imageMinWidth + range / 2)
}
init(_ imageWidth: Binding<CGFloat>, imageMinWidth: CGFloat, imageMaxWidth: CGFloat, step: CGFloat) {