Skip to content

High performance self-hosted photo and video management solution.

fix(mobile): prevent snapping to center on pinch-to-zoom release (#29207) (#29343)

cmdPromptCritical66d010381e32
diff --git a/mobile/lib/widgets/photo_view/src/core/photo_view_core.dart b/mobile/lib/widgets/photo_view/src/core/photo_view_core.dart
index c230a65690..a8249b48f9 100644
--- a/mobile/lib/widgets/photo_view/src/core/photo_view_core.dart
+++ b/mobile/lib/widgets/photo_view/src/core/photo_view_core.dart
@@ -203,7 +203,7 @@ class PhotoViewCoreState extends State<PhotoViewCore>
} else if (scaleState == PhotoViewScaleState.zoomedIn) {
animateRotation(controller.rotation, 0);
if (_shouldAllowPanRotate()) {
- animatePosition(controller.position, Offset.zero);
+ animatePosition(controller.position, clampPosition());
}
}