add all function shortcuts to contextmenu
This commit is contained in:
parent
7dd045bb33
commit
1d817c8e0f
|
|
@ -365,7 +365,8 @@ export const components: TLComponents = {
|
|||
return (
|
||||
<DefaultContextMenu {...rest}>
|
||||
<DefaultContextMenuContent />
|
||||
<TldrawUiMenuGroup id="custom-actions">
|
||||
|
||||
{/* Camera Controls */}
|
||||
<TldrawUiMenuItem
|
||||
id="zoom-to-selection"
|
||||
label="Zoom to Selection"
|
||||
|
|
@ -389,6 +390,37 @@ export const components: TLComponents = {
|
|||
disabled={!hasCameraHistory}
|
||||
onSelect={() => revertCamera(editor)}
|
||||
/>
|
||||
|
||||
{/* Shape Creation Tools */}
|
||||
<TldrawUiMenuItem
|
||||
id="video-chat"
|
||||
label="Create Video Chat"
|
||||
icon="video"
|
||||
kbd="v"
|
||||
onSelect={() => {
|
||||
editor.setCurrentTool('VideoChat');
|
||||
}}
|
||||
/>
|
||||
<TldrawUiMenuItem
|
||||
id="chat-box"
|
||||
label="Create Chat Box"
|
||||
icon="chat"
|
||||
kbd="c"
|
||||
onSelect={() => {
|
||||
editor.setCurrentTool('ChatBox');
|
||||
}}
|
||||
/>
|
||||
<TldrawUiMenuItem
|
||||
id="embed"
|
||||
label="Create Embed"
|
||||
icon="embed"
|
||||
kbd="e"
|
||||
onSelect={() => {
|
||||
editor.setCurrentTool('Embed');
|
||||
}}
|
||||
/>
|
||||
|
||||
Frame-specific actions
|
||||
{isFrame && (
|
||||
<>
|
||||
<TldrawUiMenuItem
|
||||
|
|
@ -405,7 +437,7 @@ export const components: TLComponents = {
|
|||
/>
|
||||
</>
|
||||
)}
|
||||
</TldrawUiMenuGroup>
|
||||
|
||||
</DefaultContextMenu>
|
||||
)
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue