mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Add the shape lock button for mobile (#1054)
This commit is contained in:
parent
e38045ccad
commit
104e48b6cb
5 changed files with 43 additions and 15 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue