Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-03-23 17:45:23 +08:00
parent 0957dfc66e
commit 2220372e4f
43 changed files with 99 additions and 96 deletions

View File

@@ -235,6 +235,7 @@ class _ViewerState extends State<Viewer> with SingleTickerProviderStateMixin {
void _handleDoubleTap() {
if (!mounted) return;
if (_animationController.isAnimating) return;
_stopFling();
_scaleFrom = _scale;
_positionFrom = _position;
@@ -528,6 +529,7 @@ class _ViewerState extends State<Viewer> with SingleTickerProviderStateMixin {
widget.onChangePage!.call(event.scrollDelta.dy < 0 ? -1 : 1);
return;
}
_stopFling();
final double scaleChange = math.exp(-event.scrollDelta.dy / _scaleFactor);
final Offset local = event.localPosition;
final Offset focalPointScene = _toScene(local);