Remap Safari gesture events to wheel events - #5492

(still needs some more testing)
This commit is contained in:
Bryan Housel
2018-11-17 02:31:15 -05:00
parent f61c482188
commit b7e218a6cb
2 changed files with 38 additions and 2 deletions
+7 -1
View File
@@ -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();
}
}