mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Fix issue where browsers could page back or forward when swiping horizontally over the map with a trackpad (close #5552)
This commit is contained in:
@@ -149,6 +149,10 @@ export function rendererMap(context) {
|
||||
});
|
||||
|
||||
selection
|
||||
.on('wheel.map mousewheel.map', function() {
|
||||
// disable swipe-to-navigate browser pages on trackpad/magic mouse – #5552
|
||||
d3_event.preventDefault();
|
||||
})
|
||||
.call(_zoomerPanner)
|
||||
.call(_zoomerPanner.transform, projection.transform())
|
||||
.on('dblclick.zoom', null); // override d3-zoom dblclick handling
|
||||
|
||||
Reference in New Issue
Block a user