Files
SnowLuma/.pnpm-store/v11/files/ea/134e243cc05370a3d08267dc0d190ffaf3d56be39149944b9c6c716b9e1d035d6bb69bbde5929b69ec0eb923c25436e361f0f829feabe174a5595ed0d44df9
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

20 lines
664 B
Plaintext

const isPrimaryPointer = (event) => {
if (event.pointerType === "mouse") {
return typeof event.button !== "number" || event.button <= 0;
}
else {
/**
* isPrimary is true for all mice buttons, whereas every touch point
* is regarded as its own input. So subsequent concurrent touch points
* will be false.
*
* Specifically match against false here as incomplete versions of
* PointerEvents in very old browser might have it set as undefined.
*/
return event.isPrimary !== false;
}
};
export { isPrimaryPointer };
//# sourceMappingURL=is-primary-pointer.mjs.map