diff --git a/Sources/DSWaveformImageViews/SwiftUI/WaveformView.swift b/Sources/DSWaveformImageViews/SwiftUI/WaveformView.swift index ec32443..85b341b 100644 --- a/Sources/DSWaveformImageViews/SwiftUI/WaveformView.swift +++ b/Sources/DSWaveformImageViews/SwiftUI/WaveformView.swift @@ -41,7 +41,6 @@ public struct WaveformView: View { public var body: some View { GeometryReader { geometry in content(WaveformShape(samples: samples, configuration: configuration, renderer: renderer)) - .scaleEffect(x: scaleDuringResize(for: geometry), y: 1, anchor: .trailing) .onAppear { guard samples.isEmpty else { return } update(size: geometry.size, url: audioURL, configuration: configuration) @@ -78,18 +77,6 @@ public struct WaveformView: View { updateTask(nil) } } - - /* - * During resizing, we only visually scale the shape to make it look more seamless, - * before we re-calculate the pixel-perfect re-sampled waveform, which is costly. - * Due to the complex way we need to render the actual waveform based on samples - * available and size to occupy, the re-scaling currently only supports enlarging. - * If we resize to a smaller size, the waveform simply overflows. - */ - private func scaleDuringResize(for geometry: GeometryProxy) -> CGFloat { - guard currentSize != .zero else { return 1 } - return max(geometry.size.width / currentSize.width, 1) - } } public extension WaveformView {