mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-19 23:40:45 +02:00
put menu trigger to top left
This commit is contained in:
@@ -107,29 +107,24 @@ export const MobileMenu = ({
|
|||||||
return (
|
return (
|
||||||
<div className="App-toolbar-content">
|
<div className="App-toolbar-content">
|
||||||
<MainMenuTunnel.Out />
|
<MainMenuTunnel.Out />
|
||||||
{actionManager.renderAction("toggleEditMenu")}
|
{renderTopRightUI?.(true, appState)}
|
||||||
{actionManager.renderAction(
|
|
||||||
appState.multiElement ? "finalize" : "duplicateSelection",
|
|
||||||
)}
|
|
||||||
{actionManager.renderAction("deleteSelectedElements")}
|
|
||||||
<div>
|
|
||||||
{actionManager.renderAction("undo")}
|
|
||||||
{actionManager.renderAction("redo")}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{renderSidebars()}
|
{/* {renderSidebars()} */}
|
||||||
|
|
||||||
<FixedSideContainer side="top" className="App-top-bar">
|
<FixedSideContainer side="top" className="App-top-bar">
|
||||||
|
{renderAppToolbar()}
|
||||||
<HintViewer
|
<HintViewer
|
||||||
appState={appState}
|
appState={appState}
|
||||||
isMobile={true}
|
isMobile={true}
|
||||||
device={device}
|
device={device}
|
||||||
app={app}
|
app={app}
|
||||||
/>
|
/>
|
||||||
|
{renderWelcomeScreen && <WelcomeScreenCenterTunnel.Out />}
|
||||||
</FixedSideContainer>
|
</FixedSideContainer>
|
||||||
<div
|
<div
|
||||||
className="App-bottom-bar"
|
className="App-bottom-bar"
|
||||||
|
@@ -18,6 +18,18 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
row-gap: 0.75rem;
|
row-gap: 0.75rem;
|
||||||
|
|
||||||
|
// When main menu is in the top toolbar, position relative to trigger
|
||||||
|
&.main-menu-dropdown {
|
||||||
|
position: fixed;
|
||||||
|
left: 1rem;
|
||||||
|
top: 3.5rem;
|
||||||
|
min-width: 280px;
|
||||||
|
max-width: calc(100vw - 2rem);
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
z-index: var(--zIndex-layerUI);
|
||||||
|
}
|
||||||
|
|
||||||
.dropdown-menu-container {
|
.dropdown-menu-container {
|
||||||
padding: 8px 8px;
|
padding: 8px 8px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
@@ -53,6 +53,8 @@ const MainMenu = Object.assign(
|
|||||||
onSelect={composeEventHandlers(onSelect, () => {
|
onSelect={composeEventHandlers(onSelect, () => {
|
||||||
setAppState({ openMenu: null });
|
setAppState({ openMenu: null });
|
||||||
})}
|
})}
|
||||||
|
placement="bottom"
|
||||||
|
className={device.editor.isMobile ? "main-menu-dropdown" : ""}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
{device.editor.isMobile && appState.collaborators.size > 0 && (
|
{device.editor.isMobile && appState.collaborators.size > 0 && (
|
||||||
|
@@ -235,7 +235,6 @@ body.excalidraw-cursor-resize * {
|
|||||||
z-index: var(--zIndex-layerUI);
|
z-index: var(--zIndex-layerUI);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.App-bottom-bar {
|
.App-bottom-bar {
|
||||||
@@ -280,14 +279,7 @@ body.excalidraw-cursor-resize * {
|
|||||||
|
|
||||||
.App-toolbar-content {
|
.App-toolbar-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
|
||||||
padding: 8px;
|
|
||||||
|
|
||||||
.dropdown-menu--mobile {
|
|
||||||
bottom: 55px;
|
|
||||||
top: auto;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.App-mobile-menu {
|
.App-mobile-menu {
|
||||||
|
Reference in New Issue
Block a user