From c0421af1dbe251e362b6cbe0c1348609742caf29 Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Thu, 14 Sep 2023 09:54:18 +0800 Subject: [PATCH] add check in gesture detector for MacOS --- lib/filament_gesture_detector.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/filament_gesture_detector.dart b/lib/filament_gesture_detector.dart index 3aadcbee..1ec5e42b 100644 --- a/lib/filament_gesture_detector.dart +++ b/lib/filament_gesture_detector.dart @@ -92,7 +92,7 @@ class _FilamentGestureDetectorState extends State { _scrollTimer?.cancel(); widget.controller.zoomBegin(); widget.controller - .zoomUpdate(pointerSignal.scrollDelta.dy > 0 ? 10 : -10); + .zoomUpdate(pointerSignal.scrollDelta.dy > 0 ? 1 : -1); _scrollTimer = Timer(Duration(milliseconds: 100), () { widget.controller.zoomEnd(); _scrollTimer = null; @@ -205,8 +205,9 @@ class _FilamentGestureDetectorState extends State { // couldn't find any equivalent for pointerCount in Listener so we use two widgets: // - outer is a GestureDetector only for pinch zoom // - inner is a Listener for all other gestures (including scroll zoom on desktop) - child: - Platform.isLinux || Platform.isWindows ? _desktop() : _mobile()), + child: Platform.isLinux || Platform.isWindows || Platform.isMacOS + ? _desktop() + : _mobile()), widget.showControlOverlay ? Align( alignment: Alignment.bottomRight,