mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-11 03:20:14 +02:00
Add the shape lock button for mobile (#1054)
This commit is contained in:
@@ -33,7 +33,7 @@ interface LayerUIProps {
|
||||
setElements: (elements: readonly ExcalidrawElement[]) => void;
|
||||
onRoomCreate: () => void;
|
||||
onRoomDestroy: () => void;
|
||||
onToggleLock: () => void;
|
||||
onLockToggle: () => void;
|
||||
}
|
||||
|
||||
export const LayerUI = React.memo(
|
||||
@@ -47,7 +47,7 @@ export const LayerUI = React.memo(
|
||||
setElements,
|
||||
onRoomCreate,
|
||||
onRoomDestroy,
|
||||
onToggleLock,
|
||||
onLockToggle,
|
||||
}: LayerUIProps) => {
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
@@ -101,6 +101,7 @@ export const LayerUI = React.memo(
|
||||
setAppState={setAppState}
|
||||
onRoomCreate={onRoomCreate}
|
||||
onRoomDestroy={onRoomDestroy}
|
||||
onLockToggle={onLockToggle}
|
||||
/>
|
||||
) : (
|
||||
<>
|
||||
@@ -159,9 +160,8 @@ export const LayerUI = React.memo(
|
||||
</Island>
|
||||
<LockIcon
|
||||
checked={appState.elementLocked}
|
||||
onChange={onToggleLock}
|
||||
onChange={onLockToggle}
|
||||
title={t("toolBar.lock")}
|
||||
isButton={isMobile}
|
||||
/>
|
||||
</Stack.Row>
|
||||
</Stack.Col>
|
||||
|
Reference in New Issue
Block a user