Apply formatting changes

This commit is contained in:
eoghanmurray
2023-04-05 15:51:24 +00:00
committed by github-actions[bot]
parent 3a6de4b129
commit be856443dd

View File

@@ -240,13 +240,14 @@ function initMouseInteractionObserver({
let pointerType: PointerTypes | null = null; let pointerType: PointerTypes | null = null;
let e = event; let e = event;
if ('pointerType' in e) { if ('pointerType' in e) {
Object.keys(PointerTypes) Object.keys(PointerTypes).forEach(
.forEach((pointerKey: keyof typeof PointerKeys) => { (pointerKey: keyof typeof PointerKeys) => {
if ((e as PointerEvent).pointerType === pointerKey.toLowerCase()) { if ((e as PointerEvent).pointerType === pointerKey.toLowerCase()) {
pointerType = PointerTypes[pointerKey]; pointerType = PointerTypes[pointerKey];
return; return;
} }
}); },
);
if (pointerType === PointerTypes.Touch) { if (pointerType === PointerTypes.Touch) {
if (MouseInteractions[eventKey] === MouseInteractions.MouseDown) { if (MouseInteractions[eventKey] === MouseInteractions.MouseDown) {
// we are actually listening on 'pointerdown' // we are actually listening on 'pointerdown'