mirror of
https://github.com/hansjone/mind-map.git
synced 2026-10-09 22:43:22 +08:00
feat: add topology view mode with router icons and link-style edges
Canvas-global nodeViewMode (bubble/card/topology) can be set at create or via prefs; topology draws NE routers with straight blue center links and exposes router icon to agents. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
200c8bd450
commit
74f0d8e78a
15 changed files with 322 additions and 103 deletions
|
|
@ -123,6 +123,7 @@ function promoteChildrenOnDelete(g: MutableGraph, nodeId: string): Op[] {
|
|||
export function createEmptyGraph(
|
||||
title = "未命名画布",
|
||||
rootText?: string,
|
||||
prefsOverride?: Partial<CanvasPrefs>,
|
||||
): MutableGraph {
|
||||
const canvasId = newId("c");
|
||||
const nodeId = newId("n");
|
||||
|
|
@ -137,6 +138,7 @@ export function createEmptyGraph(
|
|||
showHoverCard: true,
|
||||
inspectorMode: "selection",
|
||||
nodeViewMode: "card",
|
||||
...prefsOverride,
|
||||
};
|
||||
const canvas: CanvasMeta = {
|
||||
id: canvasId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue