mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 14:47: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';
|
window.document.body.style.cursor = 'move';
|
||||||
// If I dont ignore touchmove events, browser console shows a lot of errors:
|
// If I dont ignore touchmove events, browser console shows a lot of errors:
|
||||||
// Unable to preventDefault inside passive event listener invocation.
|
// Unable to preventDefault inside passive event listener invocation.
|
||||||
if (mouseMoveEvent.type !== 'touchmove') mouseMoveEvent.preventDefault();
|
if (mouseMoveEvent.type !== 'touchmove') {
|
||||||
|
mouseMoveEvent.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
// Fire drag event ...
|
// Fire drag event ...
|
||||||
screenManager.fireEvent('update');
|
screenManager.fireEvent('update');
|
||||||
wasDragged = true;
|
wasDragged = true;
|
||||||
};
|
};
|
||||||
screenManager.addEvent('mousemove', workspace._mouseMoveListener);
|
screenManager.addEvent('mousemove', workspace._mouseMoveListener);
|
||||||
screenManager.addEvent('touchmove', workspace._mouseMoveListener);
|
// screenManager.addEvent('touchmove', workspace._mouseMoveListener);
|
||||||
|
|
||||||
// Register mouse up listeners ...
|
// Register mouse up listeners ...
|
||||||
workspace._mouseUpListener = () => {
|
workspace._mouseUpListener = () => {
|
||||||
@ -302,14 +304,14 @@ class Workspace {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
screenManager.addEvent('mouseup', workspace._mouseUpListener);
|
screenManager.addEvent('mouseup', workspace._mouseUpListener);
|
||||||
screenManager.addEvent('touchend', workspace._mouseUpListener);
|
// screenManager.addEvent('touchend', workspace._mouseUpListener);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
workspace._mouseUpListener();
|
workspace._mouseUpListener();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
screenManager.addEvent('mousedown', mouseDownListener);
|
screenManager.addEvent('mousedown', mouseDownListener);
|
||||||
screenManager.addEvent('touchstart', mouseDownListener);
|
// screenManager.addEvent('touchstart', mouseDownListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
getZoom() {
|
getZoom() {
|
||||||
|
Loading…
Reference in New Issue
Block a user