Use one noContextMenu function in both the src/- and web/-folders

Currently we duplicate this event handler function in multiple places, which seems unnecessary.
This commit is contained in:
Jonas Jenwald 2023-09-23 15:37:13 +02:00
parent a09b7228fb
commit 1df31c0284
7 changed files with 20 additions and 32 deletions

View file

@ -604,13 +604,6 @@ function getVisibleElements({
return { first, last, views: visible, ids };
}
/**
* Event handler to suppress context menu.
*/
function noContextMenuHandler(evt) {
evt.preventDefault();
}
function normalizeWheelEventDirection(evt) {
let delta = Math.hypot(evt.deltaX, evt.deltaY);
const angle = Math.atan2(evt.deltaY, evt.deltaX);
@ -881,7 +874,6 @@ export {
MAX_AUTO_SCALE,
MAX_SCALE,
MIN_SCALE,
noContextMenuHandler,
normalizeWheelEventDelta,
normalizeWheelEventDirection,
OutputScale,