fix: library actions inside the sidebar (#5638)
This commit is contained in:
parent
59a1d192d2
commit
553b493f37
@ -432,56 +432,58 @@ const LayerUI = ({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{!device.isMobile && (
|
{!device.isMobile && (
|
||||||
<div
|
<>
|
||||||
className={clsx("layer-ui__wrapper", {
|
<div
|
||||||
"disable-pointerEvents":
|
className={clsx("layer-ui__wrapper", {
|
||||||
appState.draggingElement ||
|
"disable-pointerEvents":
|
||||||
appState.resizingElement ||
|
appState.draggingElement ||
|
||||||
(appState.editingElement &&
|
appState.resizingElement ||
|
||||||
!isTextElement(appState.editingElement)),
|
(appState.editingElement &&
|
||||||
})}
|
!isTextElement(appState.editingElement)),
|
||||||
style={
|
})}
|
||||||
appState.isLibraryOpen &&
|
style={
|
||||||
appState.isLibraryMenuDocked &&
|
appState.isLibraryOpen &&
|
||||||
device.canDeviceFitSidebar
|
appState.isLibraryMenuDocked &&
|
||||||
? { width: `calc(100% - ${LIBRARY_SIDEBAR_WIDTH}px)` }
|
device.canDeviceFitSidebar
|
||||||
: {}
|
? { width: `calc(100% - ${LIBRARY_SIDEBAR_WIDTH}px)` }
|
||||||
}
|
: {}
|
||||||
>
|
}
|
||||||
{renderFixedSideContainer()}
|
>
|
||||||
<Footer
|
{renderFixedSideContainer()}
|
||||||
appState={appState}
|
<Footer
|
||||||
actionManager={actionManager}
|
|
||||||
renderCustomFooter={renderCustomFooter}
|
|
||||||
showExitZenModeBtn={showExitZenModeBtn}
|
|
||||||
/>
|
|
||||||
{appState.showStats && (
|
|
||||||
<Stats
|
|
||||||
appState={appState}
|
appState={appState}
|
||||||
setAppState={setAppState}
|
actionManager={actionManager}
|
||||||
elements={elements}
|
renderCustomFooter={renderCustomFooter}
|
||||||
onClose={() => {
|
showExitZenModeBtn={showExitZenModeBtn}
|
||||||
actionManager.executeAction(actionToggleStats);
|
|
||||||
}}
|
|
||||||
renderCustomStats={renderCustomStats}
|
|
||||||
/>
|
/>
|
||||||
)}
|
{appState.showStats && (
|
||||||
{appState.scrolledOutside && (
|
<Stats
|
||||||
<button
|
appState={appState}
|
||||||
className="scroll-back-to-content"
|
setAppState={setAppState}
|
||||||
onClick={() => {
|
elements={elements}
|
||||||
setAppState({
|
onClose={() => {
|
||||||
...calculateScrollCenter(elements, appState, canvas),
|
actionManager.executeAction(actionToggleStats);
|
||||||
});
|
}}
|
||||||
}}
|
renderCustomStats={renderCustomStats}
|
||||||
>
|
/>
|
||||||
{t("buttons.scrollBackToContent")}
|
)}
|
||||||
</button>
|
{appState.scrolledOutside && (
|
||||||
)}
|
<button
|
||||||
|
className="scroll-back-to-content"
|
||||||
|
onClick={() => {
|
||||||
|
setAppState({
|
||||||
|
...calculateScrollCenter(elements, appState, canvas),
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("buttons.scrollBackToContent")}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
{appState.isLibraryOpen && (
|
{appState.isLibraryOpen && (
|
||||||
<div className="layer-ui__sidebar">{libraryMenu}</div>
|
<div className="layer-ui__sidebar">{libraryMenu}</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user