diff --git a/packages/core/client/src/application/index.ts b/packages/core/client/src/application/index.ts index a10d96d43..acfc735ef 100644 --- a/packages/core/client/src/application/index.ts +++ b/packages/core/client/src/application/index.ts @@ -8,3 +8,4 @@ export * from './schema-initializer'; export * from './schema-settings'; export * from './schema-toolbar'; export * from './PluginSettingsManager'; +export { ApplicationContext } from './context'; diff --git a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphDrawPage.tsx b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphDrawPage.tsx index 2e1659123..cfa788584 100644 --- a/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphDrawPage.tsx +++ b/packages/plugins/@nocobase/plugin-graph-collection-manager/src/client/GraphDrawPage.tsx @@ -23,6 +23,8 @@ import { useCompile, useCurrentAppInfo, useGlobalTheme, + useApp, + ApplicationContext, } from '@nocobase/client'; import { App, Button, ConfigProvider, Layout, Spin, Switch, Tooltip } from 'antd'; import dagre from 'dagre'; @@ -341,7 +343,10 @@ const handelResetLayout = (isTemporaryLayout?) => { }); targetGraph.positionCell(nodes[0], 'top-left', { padding: 100 }); if (!isTemporaryLayout) { - targetGraph.updatePositionAction(updatePositionData, true); + targetGraph.updatePositionAction( + updatePositionData.filter((v) => v.id), + true, + ); } }; @@ -360,6 +365,7 @@ export const GraphDrawPage = React.memo(() => { const [loading, setLoading] = useState(false); const { refreshCM, collections } = useCollectionManager(); const currentAppInfo = useCurrentAppInfo(); + const app = useApp(); const { data: { database }, } = currentAppInfo; @@ -453,7 +459,6 @@ export const GraphDrawPage = React.memo(() => { }, true, ); - register({ shape: 'er-rect', width: NODE_WIDTH, @@ -499,7 +504,9 @@ export const GraphDrawPage = React.memo(() => {
- + + +