mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-07-20 16:37:08 +00:00
Update wheelPxFactor on Linux+Chrome
Fixes #8859 Signed-off-by: Iván Sánchez Ortega <ivan@sanchezortega.es>
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user