diff --git a/src/ui-overrides.tsx b/src/ui-overrides.tsx
index 91b02f5..cd918e6 100644
--- a/src/ui-overrides.tsx
+++ b/src/ui-overrides.tsx
@@ -226,56 +226,6 @@ const revertCamera = (editor: Editor) => {
}
};
-function CustomContextMenu(props: TLUiContextMenuProps) {
- const editor = useEditor()
- const hasSelection = editor.getSelectedShapeIds().length > 0
- const selectedShape = editor.getSelectedShapes()[0]
- const hasCameraHistory = cameraHistory.length > 0
-
- return (
-
-
- {
- console.log('Reverting camera');
- revertCamera(editor);
- }}
- />
- {
- console.log('Zoom to Selection clicked');
- zoomToSelection(editor);
- }}
- />
- {
- console.log('Copy Link to Current View clicked');
- copyLinkToCurrentView(editor);
- }}
- />
-
-
-
- )
-}
-
export const uiOverrides: TLUiOverrides = {
tools(editor, tools) {
return {
@@ -409,6 +359,8 @@ export const components: TLComponents = {
const editor = useEditor()
const hasSelection = editor.getSelectedShapeIds().length > 0
const hasCameraHistory = cameraHistory.length > 0
+ const selectedShape = editor.getSelectedShapes()[0]
+ const isFrame = selectedShape?.type === 'frame'
return (
@@ -426,7 +378,7 @@ export const components: TLComponents = {
id="copy-link-to-current-view"
label="Copy Link to Current View"
icon="link"
- kbd="c"
+ kbd="s"
onSelect={() => copyLinkToCurrentView(editor)}
/>
revertCamera(editor)}
/>
+ {isFrame && (
+ <>
+ copyFrameLink(editor, selectedShape.id)}
+ />
+ zoomToSelection(editor)}
+ />
+ >
+ )}
)