UNPKG

lingo3d

Version:

Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor

18 lines 636 B
import { handleStopPropagation } from "../../engine/hotkeys"; import { DEBUG } from "../../globals"; const stop = (e) => e.stopPropagation(); const stopPrevent = (e) => { e.stopPropagation(); e.preventDefault(); }; export const stopPropagation = (el) => { if (!el) return; el.addEventListener("mousedown", handleStopPropagation); el.addEventListener("click", stop); !DEBUG && el.addEventListener("contextmenu", stopPrevent); el.addEventListener("pointerdown", stop); el.addEventListener("touchstart", stop); el.addEventListener("keydown", stop); }; //# sourceMappingURL=stopPropagation.js.map