add all function shortcuts to contextmenu
This commit is contained in:
parent
7a73870bf5
commit
aa1b40dd21
|
|
@ -365,7 +365,8 @@ export const components: TLComponents = {
|
||||||
return (
|
return (
|
||||||
<DefaultContextMenu {...rest}>
|
<DefaultContextMenu {...rest}>
|
||||||
<DefaultContextMenuContent />
|
<DefaultContextMenuContent />
|
||||||
<TldrawUiMenuGroup id="custom-actions">
|
|
||||||
|
{/* Camera Controls */}
|
||||||
<TldrawUiMenuItem
|
<TldrawUiMenuItem
|
||||||
id="zoom-to-selection"
|
id="zoom-to-selection"
|
||||||
label="Zoom to Selection"
|
label="Zoom to Selection"
|
||||||
|
|
@ -389,6 +390,37 @@ export const components: TLComponents = {
|
||||||
disabled={!hasCameraHistory}
|
disabled={!hasCameraHistory}
|
||||||
onSelect={() => revertCamera(editor)}
|
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 && (
|
{isFrame && (
|
||||||
<>
|
<>
|
||||||
<TldrawUiMenuItem
|
<TldrawUiMenuItem
|
||||||
|
|
@ -405,7 +437,7 @@ export const components: TLComponents = {
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</TldrawUiMenuGroup>
|
|
||||||
</DefaultContextMenu>
|
</DefaultContextMenu>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue