photo_view
photo_view copied to clipboard
[FEATURE REQUEST] Let Users Over Drag At The Edges Instead of Clamping the Image Movement
Dragging & Panning Behavior
Currently, panning the image works well. I saw that someone requested you to implement inertia or momentum after the drag ends. (couldn't find the issue sorry again) So by using the ScaleEndDetails.velocity
, you already made it more user-friendly. Thanks a lot for this behavior. (Btw, this is not my actual request for this issue but it would be better if you let us change the friction amount so it can move a bit more smoothly.)
Enable Over-Dragging
Currently, when a user drags the image to the edges, it is stoped. (Clamped). Would you mind adding a behavior so that a user can over drag an image instead of stopping immediately? It will be like the over-scrolling physics when we add AlwaysScrollableScrollPhysics
to a regular ListView
. When released, it will return back to the edge.
Considering the UX, it will be better for users to understand that they are at the edge.
Did you try using your own PhotoViewController
?
class _YourPhotoViewController extends PhotoViewController {
@override
void updateMultiple({Offset? position, double? scale, double? rotation, Offset? rotationFocusPoint}) {
super.updateMultiple(
position: position,
scale: scale?.clamp(your_min_scale, your_max_scale).toDouble(),
rotation: rotation,
rotationFocusPoint: rotationFocusPoint,
);
}
}