Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 4b5d311

Browse files
committed
Update comment
1 parent 7af8a5b commit 4b5d311

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/web_ui/lib/src/engine/pointer_binding.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,11 @@ mixin _WheelEventListenerMixin on _BaseAdapter {
340340
const int domDeltaLine = 0x01;
341341
const int domDeltaPage = 0x02;
342342

343-
// Logic from https://stackoverflow.com/a/62415754
344343
ui.PointerDeviceKind kind = ui.PointerDeviceKind.mouse;
345344
if (event.deltaX % 120 != 0 || event.deltaY % 120 != 0) {
345+
// While not standardized, all major browsers use a delta of 120 to
346+
// represent one mouse wheel turn. If either dimension of the delta
347+
// is not divisible by 120, this event must not be from a mouse wheel.
346348
kind = ui.PointerDeviceKind.trackpad;
347349
}
348350

0 commit comments

Comments
 (0)