Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Hosted Weblate 2025-03-25 23:23:14 +01:00
commit e2b9d3f9b2
No known key found for this signature in database
GPG key ID: A3FAAA06E6569B4C
2 changed files with 7 additions and 2 deletions

View file

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
## <a id="unreleased"></a>[Unreleased]
### Fixed
- swiping images for some combinations of screen size, device pixel ratio, and image size
## <a id="v1.12.7"></a>[v1.12.7] - 2025-03-16
### Added

View file

@ -1,5 +1,6 @@
import 'package:aves_magnifier/src/controller/controller_delegate.dart';
import 'package:equatable/equatable.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
mixin EdgeHitDetector on AvesMagnifierControllerDelegate {
@ -15,7 +16,7 @@ mixin EdgeHitDetector on AvesMagnifierControllerDelegate {
final x = -position.dx;
final range = _boundaries.getXEdges(scale: _scale);
return EdgeHit(x <= range.min, x >= range.max);
return EdgeHit(x <= range.min + precisionErrorTolerance, x >= range.max - precisionErrorTolerance);
}
EdgeHit getYEdgeHit() {
@ -25,7 +26,7 @@ mixin EdgeHitDetector on AvesMagnifierControllerDelegate {
final y = -position.dy;
final range = _boundaries.getYEdges(scale: _scale);
return EdgeHit(y <= range.min, y >= range.max);
return EdgeHit(y <= range.min + precisionErrorTolerance, y >= range.max - precisionErrorTolerance);
}
bool shouldMoveX(Offset move, bool canFling) {