remove dependency on MUI
This commit is contained in:
parent
74f4c3bead
commit
3e192f8e26
8 changed files with 72 additions and 44 deletions
|
|
@ -13,6 +13,7 @@ export type Connections = {
|
|||
}
|
||||
|
||||
export function detectConnections(state: VisualEditorState): Connections {
|
||||
const startTime = performance.now();
|
||||
// detect what is 'connected'
|
||||
const arrow2SideMap = new Map<string,[{ uid: string; part: RectSide; } | undefined, { uid: string; part: RectSide; } | undefined]>();
|
||||
const side2ArrowMap = new Map<string, Set<["start"|"end", string]>>();
|
||||
|
|
@ -72,6 +73,11 @@ export function detectConnections(state: VisualEditorState): Connections {
|
|||
}
|
||||
}
|
||||
|
||||
const endTime = performance.now();
|
||||
|
||||
// rather slow, about 10ms for a large model:
|
||||
// console.debug("connection detection took", endTime-startTime);
|
||||
|
||||
return {
|
||||
arrow2SideMap,
|
||||
side2ArrowMap,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue