diff options
Diffstat (limited to 'packages/frontend/src/scripts/touch.ts')
| -rw-r--r-- | packages/frontend/src/scripts/touch.ts | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/packages/frontend/src/scripts/touch.ts b/packages/frontend/src/scripts/touch.ts deleted file mode 100644 index 13c9d648dc..0000000000 --- a/packages/frontend/src/scripts/touch.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * SPDX-FileCopyrightText: syuilo and misskey-project - * SPDX-License-Identifier: AGPL-3.0-only - */ - -import { ref } from 'vue'; -import { deviceKind } from '@/scripts/device-kind.js'; - -const isTouchSupported = 'maxTouchPoints' in navigator && navigator.maxTouchPoints > 0; - -export let isTouchUsing = deviceKind === 'tablet' || deviceKind === 'smartphone'; - -if (isTouchSupported && !isTouchUsing) { - window.addEventListener('touchstart', () => { - // maxTouchPointsなどでの判定だけだと、「タッチ機能付きディスプレイを使っているがマウスでしか操作しない」場合にも - // タッチで使っていると判定されてしまうため、実際に一度でもタッチされたらtrueにする - isTouchUsing = true; - }, { passive: true }); -} - -/** (MkHorizontalSwipe) 横スワイプ中か? */ -export const isHorizontalSwipeSwiping = ref(false); |