Skip to content

Commit

Permalink
🚸 プレイヤーは中身が読み込まれる前にドラッグできるように
Browse files Browse the repository at this point in the history
  • Loading branch information
ci7lus committed Jul 27, 2022
1 parent ccfdac0 commit fe01ab6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<link href="dist/main.css" rel="stylesheet" />
</head>
<body>
<div id="app">
<div class="overflow-hidden">
<div id="app" class="h-screen app-region-drag">
<div class="overflow-hidden select-none app-region-drag">
<div class="w-full h-screen flex items-center justify-center">
<div class="flex items-center justify-center space-x-6 mr-4">
<img
Expand Down
4 changes: 3 additions & 1 deletion src/State.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ export const StateRoot: React.FC<{
<RecoilStoredSync />
<RecoilSharedSync initialStates={states} />
<QueryClientProvider client={queryClient}>
<div className={clsx("w-full", "h-full", "relative")}>
<div
className={clsx("w-full", "h-full", "relative", "app-region-no-drag")}
>
<div
id="OnBackgroundComponents"
className={clsx(
Expand Down
8 changes: 7 additions & 1 deletion src/components/global/Splash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ export const Splash: React.FC<{ children?: React.ReactNode }> = ({
setOpacity(1)
}, [])
return (
<div className={clsx("overflow-hidden", "select-none")}>
<div
className={clsx(
"overflow-hidden",
"select-none",
!children && "app-region-drag"
)}
>
<div
className={clsx(
"w-full",
Expand Down
1 change: 1 addition & 0 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
contain: paint;
}

#react-refresh-overlay,
.app-region-drag {
-webkit-app-region: drag;
}
Expand Down

0 comments on commit fe01ab6

Please sign in to comment.