Update wheelPxFactor on Linux+Chrome

Fixes #8859

Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
This commit is contained in:
Iván Sánchez Ortega
2023-02-23 14:56:27 +01:00
parent 1fa85b6c3c
commit e5259dfcb5

View File

@ -264,11 +264,10 @@ export function getMousePosition(e, container) {
// @function getWheelPxFactor(): Number
// Gets the wheel pixel factor based on the devicePixelRatio
export function getWheelPxFactor() {
// We need double the scroll pixels (see #7403 and #4538) for all Browsers
// except OSX (Mac) -> 3x, Chrome running on Linux 1x
// We need double the scroll pixels (see #8859, #7403 and #4538) for all Browsers
// except OSX (Mac) -> 3x
const ratio = window.devicePixelRatio;
return Browser.linux && Browser.chrome ? ratio :
Browser.mac ? ratio * 3 :
return Browser.mac ? ratio * 3 :
ratio > 0 ? 2 * ratio : 1;
}