mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-21 22:27:56 +01:00
Remove touch event handlers
This commit is contained in:
parent
4095dd4aee
commit
9dbb054745
@ -273,14 +273,16 @@ class Workspace {
|
||||
window.document.body.style.cursor = 'move';
|
||||
// If I dont ignore touchmove events, browser console shows a lot of errors:
|
||||
// Unable to preventDefault inside passive event listener invocation.
|
||||
if (mouseMoveEvent.type !== 'touchmove') mouseMoveEvent.preventDefault();
|
||||
if (mouseMoveEvent.type !== 'touchmove') {
|
||||
mouseMoveEvent.preventDefault();
|
||||
}
|
||||
|
||||
// Fire drag event ...
|
||||
screenManager.fireEvent('update');
|
||||
wasDragged = true;
|
||||
};
|
||||
screenManager.addEvent('mousemove', workspace._mouseMoveListener);
|
||||
screenManager.addEvent('touchmove', workspace._mouseMoveListener);
|
||||
// screenManager.addEvent('touchmove', workspace._mouseMoveListener);
|
||||
|
||||
// Register mouse up listeners ...
|
||||
workspace._mouseUpListener = () => {
|
||||
@ -302,14 +304,14 @@ class Workspace {
|
||||
}
|
||||
};
|
||||
screenManager.addEvent('mouseup', workspace._mouseUpListener);
|
||||
screenManager.addEvent('touchend', workspace._mouseUpListener);
|
||||
// screenManager.addEvent('touchend', workspace._mouseUpListener);
|
||||
}
|
||||
} else {
|
||||
workspace._mouseUpListener();
|
||||
}
|
||||
};
|
||||
screenManager.addEvent('mousedown', mouseDownListener);
|
||||
screenManager.addEvent('touchstart', mouseDownListener);
|
||||
// screenManager.addEvent('touchstart', mouseDownListener);
|
||||
}
|
||||
|
||||
getZoom() {
|
||||
|
Loading…
Reference in New Issue
Block a user