From 42b0359527f3ec8b9172553633caf1f374fdb539 Mon Sep 17 00:00:00 2001 From: Martin Kjeldsen Date: Wed, 12 Feb 2025 16:47:50 +0100 Subject: [PATCH] =?UTF-8?q?Preserve=20last=20rotation=20angle=20when=20rot?= =?UTF-8?q?ating=20an=20image,=20preventing=20reset=20to=200=C2=B0=20on=20?= =?UTF-8?q?each=20rotation=20start.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/SwiftyCrop/View/CropView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SwiftyCrop/View/CropView.swift b/Sources/SwiftyCrop/View/CropView.swift index 21ea7a2..6f4e2a9 100644 --- a/Sources/SwiftyCrop/View/CropView.swift +++ b/Sources/SwiftyCrop/View/CropView.swift @@ -66,7 +66,7 @@ struct CropView: View { let rotationGesture = RotationGesture() .onChanged { value in - viewModel.angle = value + viewModel.angle = viewModel.lastAngle + value } .onEnded { _ in viewModel.lastAngle = viewModel.angle