diff --git a/src/pages/Workflow/GraphEditor.tsx b/src/pages/Workflow/GraphEditor.tsx index bbdb0091..c6c2ba50 100644 --- a/src/pages/Workflow/GraphEditor.tsx +++ b/src/pages/Workflow/GraphEditor.tsx @@ -114,18 +114,6 @@ export function GraphEditor(props: Partial & IGraphEditorProps) }); const { addMenu, addMenuCallback, addMenuAction, getMenuDef } = useMenu(); - // Attach nav - function fitGraphInView() { - // editor.triggerFit(); - } - - function panEditorTo() {} - - // DEBUG: console library - console.log(`library`, library); - // DEBUG: console graph - console.log(`graph`, graph); - return ( <> @@ -146,9 +134,7 @@ export function GraphEditor(props: Partial & IGraphEditorProps) height={162} width={216} graph={graph} - onTap={fitGraphInView} - onPanTo={panEditorTo} - viewrectangle={[pan[0] + sidebarWidth, pan[1], window.innerWidth , window.innerHeight]} + viewrectangle={[pan[0] + sidebarWidth, pan[1], window.innerWidth, window.innerHeight]} viewscale={scale} /> diff --git a/src/type.d.ts b/src/type.d.ts index b1a24f7f..fcc4a945 100644 --- a/src/type.d.ts +++ b/src/type.d.ts @@ -142,8 +142,8 @@ declare module 'the-graph' { export interface ITheGraphNavProps { graph: Graph; height: number; - onPanTo: () => void; - onTap: () => void; + onPanTo?: () => void; + onTap?: () => void; viewrectangle: number[]; viewscale: number; width: number;