refactor: unused func

This commit is contained in:
linonetwo 2023-07-13 11:11:06 +08:00 committed by lin onetwo
parent dac905cd1e
commit 5e35d2f4df
2 changed files with 3 additions and 17 deletions

View file

@ -114,18 +114,6 @@ export function GraphEditor(props: Partial<ITheGraphProps> & 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 (
<>
<TheGraphContainer className={`the-graph-${theme}`}>
@ -146,9 +134,7 @@ export function GraphEditor(props: Partial<ITheGraphProps> & 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}
/>
</ThumbnailContainer>

4
src/type.d.ts vendored
View file

@ -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;