fix: prevent image to change size when interacting

This commit is contained in:
Alex
2026-01-16 09:24:12 -06:00
parent e4443fa43e
commit 2cdf85ac02

View File

@@ -65,7 +65,9 @@ mixin PhotoViewControllerDelegate on State<PhotoViewCore> {
double get scale {
// for figuring out initial scale
final needsRecalc = markNeedsScaleRecalc && !scaleStateController.scaleState.isScaleStateZooming;
final isZooming = scaleStateController.scaleState.isScaleStateZooming;
final isUserInteracting = controller.position != Offset.zero;
final needsRecalc = markNeedsScaleRecalc && !isZooming && !isUserInteracting;
final scaleExistsOnController = controller.scale != null;
if (needsRecalc || !scaleExistsOnController) {