fix(Core): Fix adding systems on splash (#71)

* fix(Core): Fix adding systems on splash
This commit is contained in:
Dmitry Popov
2024-11-20 18:08:59 +04:00
committed by GitHub
parent 080af16d41
commit 0002979fda
6 changed files with 21 additions and 13 deletions

View File

@@ -12,6 +12,7 @@ export const useMapAddSystems = () => {
return useCallback((systems: CommandAddSystems) => {
const { rf } = ref.current;
const nodes = rf.getNodes();
const prepared: Node[] = systems.filter(x => !nodes.some(y => x.id === y.id)).map(convertSystem2Node);
rf.addNodes(prepared);
}, []);

View File

@@ -112,13 +112,17 @@ export const useMapHandlers = (ref: ForwardedRef<MapHandlers>, onSelectionChange
connections: [],
});
selectSystem(systemId as CommandSelectSystem);
}, 100);
}, 500);
break;
case Commands.routes:
// do nothing here
break;
case Commands.signaturesUpdated:
// do nothing here
break;
case Commands.linkSignatureToSystem:
// do nothing here
break;