How to normalize mouse wheel speed across browsers, in Dart?
There is a similar discussion for Javascript: Normalizing mousewheel speed across browsers
Assuming that Dart should provide uniform wheel readings automatically, I filled this ticket:
https://code.google.com/p/dart/issues/detail?id=18256
Meanwhile I am using this work-around:
int normalizeWheel(int dy) {
if (dy.abs() < 100) {
// Firefox: Nx3
return dy * 100 ~/ 3;
}
if (dy % 120 == 0) {
// IE: Nx120
return dy * 100 ~/ 120;
}
if (dy % 100 == 0) {
// Chrome, Opera: Nx100
return dy;
}
return dy; // unknown browser
}
Please point out the Dart way to handle differences on mouse wheel speed across browsers.