mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-23 00:29:50 +02:00
Remap Safari gesture events to wheel events - #5492
(still needs some more testing)
This commit is contained in:
+7
-1
@@ -286,12 +286,14 @@ export function uiInit(context) {
|
||||
window.onbeforeunload = function() {
|
||||
return context.save();
|
||||
};
|
||||
|
||||
window.onunload = function() {
|
||||
context.history().unlock();
|
||||
};
|
||||
|
||||
d3_select(window)
|
||||
.on('gesturestart.editor', eventCancel)
|
||||
.on('gesturechange.editor', eventCancel)
|
||||
.on('gestureend.editor', eventCancel)
|
||||
.on('resize.editor', ui.onResize);
|
||||
|
||||
|
||||
@@ -349,6 +351,10 @@ export function uiInit(context) {
|
||||
context.pan(d, 100);
|
||||
};
|
||||
}
|
||||
|
||||
function eventCancel() {
|
||||
d3_event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user