- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
19 lines
542 B
JavaScript
19 lines
542 B
JavaScript
import { getEventWindow } from './owner.mjs';
|
|
|
|
function isMouseEvent(event) {
|
|
const win = getEventWindow(event);
|
|
if (typeof win.PointerEvent !== "undefined" && event instanceof win.PointerEvent) {
|
|
return !!(event.pointerType === "mouse");
|
|
}
|
|
return event instanceof win.MouseEvent;
|
|
}
|
|
function isTouchEvent(event) {
|
|
const hasTouches = !!event.touches;
|
|
return hasTouches;
|
|
}
|
|
function isMultiTouchEvent(event) {
|
|
return isTouchEvent(event) && event.touches.length > 1;
|
|
}
|
|
|
|
export { isMouseEvent, isMultiTouchEvent, isTouchEvent };
|