mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-16 05:50:03 +02:00
fix(components/main-menu): not show canvasBackground
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
|||||||
useExcalidrawSetAppState,
|
useExcalidrawSetAppState,
|
||||||
useExcalidrawActionManager,
|
useExcalidrawActionManager,
|
||||||
useExcalidrawElements,
|
useExcalidrawElements,
|
||||||
|
useAppProps,
|
||||||
} from "../App";
|
} from "../App";
|
||||||
import {
|
import {
|
||||||
ExportIcon,
|
ExportIcon,
|
||||||
@@ -198,8 +199,12 @@ export const ChangeCanvasBackground = () => {
|
|||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const appState = useUIAppState();
|
const appState = useUIAppState();
|
||||||
const actionManager = useExcalidrawActionManager();
|
const actionManager = useExcalidrawActionManager();
|
||||||
|
const appProps = useAppProps();
|
||||||
|
|
||||||
if (appState.viewModeEnabled) {
|
if (
|
||||||
|
appState.viewModeEnabled ||
|
||||||
|
!appProps.UIOptions.canvasActions.changeViewBackgroundColor
|
||||||
|
) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
Reference in New Issue
Block a user