mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-12-03 19:18:51 +01:00
fix dropdown overlapping with welcome screen
This commit is contained in:
@@ -60,16 +60,6 @@ export const MobileMenu = ({
|
|||||||
MainMenuTunnel,
|
MainMenuTunnel,
|
||||||
DefaultSidebarTriggerTunnel,
|
DefaultSidebarTriggerTunnel,
|
||||||
} = useTunnels();
|
} = useTunnels();
|
||||||
const renderToolbar = () => {
|
|
||||||
return (
|
|
||||||
<MobileToolBar
|
|
||||||
appState={appState}
|
|
||||||
app={app}
|
|
||||||
onHandToolToggle={onHandToolToggle}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const renderAppTopBar = () => {
|
const renderAppTopBar = () => {
|
||||||
if (
|
if (
|
||||||
appState.viewModeEnabled ||
|
appState.viewModeEnabled ||
|
||||||
@@ -99,13 +89,25 @@ export const MobileMenu = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const renderToolbar = () => {
|
||||||
|
return (
|
||||||
|
<MobileToolBar
|
||||||
|
appState={appState}
|
||||||
|
app={app}
|
||||||
|
onHandToolToggle={onHandToolToggle}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{renderSidebars()}
|
{renderSidebars()}
|
||||||
<FixedSideContainer side="top" className="App-top-bar">
|
{/* welcome screen, bottom bar, and top bar all have the same z-index */}
|
||||||
{renderAppTopBar()}
|
{/* ordered in this reverse order so that top bar is on top */}
|
||||||
|
<div className="App-welcome-screen">
|
||||||
{renderWelcomeScreen && <WelcomeScreenCenterTunnel.Out />}
|
{renderWelcomeScreen && <WelcomeScreenCenterTunnel.Out />}
|
||||||
</FixedSideContainer>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className="App-bottom-bar"
|
className="App-bottom-bar"
|
||||||
style={{
|
style={{
|
||||||
@@ -141,6 +143,10 @@ export const MobileMenu = ({
|
|||||||
)}
|
)}
|
||||||
</Island>
|
</Island>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<FixedSideContainer side="top" className="App-top-bar">
|
||||||
|
{renderAppTopBar()}
|
||||||
|
</FixedSideContainer>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -237,6 +237,10 @@ body.excalidraw-cursor-resize * {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.App-welcome-screen {
|
||||||
|
z-index: var(--zIndex-layerUI);
|
||||||
|
}
|
||||||
|
|
||||||
.App-bottom-bar {
|
.App-bottom-bar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
// account for margins
|
// account for margins
|
||||||
@@ -246,7 +250,7 @@ body.excalidraw-cursor-resize * {
|
|||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
--bar-padding: calc(4 * var(--space-factor));
|
--bar-padding: calc(4 * var(--space-factor));
|
||||||
z-index: 3;
|
z-index: var(--zIndex-layerUI);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user